]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
drm: xlnx: mixer: Fix switching to 4K after 1080p
authorVishal Sagar <vishal.sagar@xilinx.com>
Mon, 1 Oct 2018 18:39:57 +0000 (00:09 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 7 Nov 2018 10:05:19 +0000 (11:05 +0100)
This patch fixes the issue of switching to higher resolution like 4K
once the primary layer has been set to a lower resolution like 1080p.
This is done by disabling the need to check frame parameters like width,
height if the plane to be set is the primary plane.

Signed-off-by: Vishal Sagar <vishal.sagar@xilinx.com>
Reviewed-by: Saurabh Sengar <saurabhs@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/gpu/drm/xlnx/xlnx_mixer.c

index 40ea7785961734ff1ec9c88f5338d6b098eba362..63ff7789b09cf2573bdae15887fd224259f690de 100644 (file)
@@ -1746,6 +1746,12 @@ static int xlnx_mix_plane_atomic_check(struct drm_plane *plane,
        int scale;
        struct xlnx_mix_plane *mix_plane = to_xlnx_plane(plane);
        struct xlnx_mix_hw *mixer_hw = to_mixer_hw(mix_plane);
+       struct xlnx_mix *mix;
+
+       /* No check required for the drm_primary_plane */
+       mix = container_of(mixer_hw, struct xlnx_mix, mixer_hw);
+       if (mix->drm_primary_layer == mix_plane)
+               return 0;
 
        scale = xlnx_mix_get_layer_scaling(mixer_hw,
                                           mix_plane->mixer_layer->id);