]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
drm: xlnx: mixer: Fixing wrong stride alignment
authorSaurabh Sengar <saurabh.singh@xilinx.com>
Mon, 5 Mar 2018 06:19:25 +0000 (11:49 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 15 Mar 2018 14:21:18 +0000 (15:21 +0100)
Stride alignment must be 8 X pixels_per_clock value.

Signed-off-by: Saurabh Sengar <saurabhs@xilinx.com>
Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/gpu/drm/xlnx/xlnx_mixer.c

index 25fcc56a719602f00b37810f92597ae1b043c555..503424a21720792c3d7cbfe8bb0d6da5339c170b 100644 (file)
@@ -98,6 +98,7 @@
 #define        XVMIX_SCALE_FACTOR_2X           1
 #define        XVMIX_SCALE_FACTOR_4X           2
 #define        XVMIX_SCALE_FACTOR_INVALID      3
+#define        XVMIX_BASE_ALIGN                8
 
 /*************************** STATIC DATA  ************************************/
 static const u32 color_table[] = {
@@ -128,8 +129,6 @@ static const u32 color_table[] = {
 #define to_xlnx_crtc(x)        container_of(x, struct xlnx_crtc, crtc)
 #define to_xlnx_plane(x)       container_of(x, struct xlnx_mix_plane, base)
 #define to_xlnx_mixer(x)       container_of(x, struct xlnx_mix, crtc)
-#define get_xlnx_mixer_mem_align(m)  \
-       sizeof((m)->mixer_hw.layer_data[0].layer_regs.buff_addr1)
 
 /**
  * enum xlnx_mix_layer_id - Describes the layer by index to be acted upon
@@ -778,7 +777,7 @@ static unsigned int xlnx_mix_crtc_get_align(struct xlnx_crtc *crtc)
        struct xlnx_mix_plane *plane = to_xlnx_plane(crtc->crtc.primary);
        struct xlnx_mix *m = plane->mixer;
 
-       return get_xlnx_mixer_mem_align(m);
+       return XVMIX_BASE_ALIGN * m->mixer_hw.ppc;
 }
 
 /**