summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-06 14:29:52 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-19 16:51:03 +0300
commit457d7180d628a303cd3c579e95f24746d915591e (patch)
tree5605cd490f45c632410da707c5e0ea93b5b46362
parent36d1b456c5fe33c054e2d5ff0033d05e36fbf8a6 (diff)
downloadlinux-stable-457d7180d628a303cd3c579e95f24746d915591e.tar.gz
linux-stable-457d7180d628a303cd3c579e95f24746d915591e.tar.bz2
linux-stable-457d7180d628a303cd3c579e95f24746d915591e.zip
drm: xlnx: zynqmp_dpsub: Use local variable in zynqmp_disp_layer_update()
Reuse the local info variable instead of going through the layer pointer in zynqmp_disp_layer_update(). This doesn't introduce any functional change. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--drivers/gpu/drm/xlnx/zynqmp_disp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c
index 212f5210e129..e3f1d9e2982b 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_disp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c
@@ -1088,7 +1088,7 @@ static int zynqmp_disp_layer_update(struct zynqmp_disp_layer *layer,
const struct drm_format_info *info = layer->drm_fmt;
unsigned int i;
- for (i = 0; i < layer->drm_fmt->num_planes; i++) {
+ for (i = 0; i < info->num_planes; i++) {
unsigned int width = state->crtc_w / (i ? info->hsub : 1);
unsigned int height = state->crtc_h / (i ? info->vsub : 1);
struct zynqmp_disp_layer_dma *dma = &layer->dmas[i];