Re: [PATCH 3/3] drm/imx: ipuv3-plane: Access old u/vbo properly in ->atomic_check for YU12/YV12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Dienstag, den 18.10.2016, 11:39 +0800 schrieb Liu Ying:
[...]
> >> @@ -359,7 +359,7 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
> >>               if ((ubo > 0xfffff8) || (vbo > 0xfffff8))
> >>                       return -EINVAL;
> >>
> >> -             if (old_fb) {
> >> +             if (old_fb && old_fb->pixel_format == fb->pixel_format) {
> >>                       old_ubo = drm_plane_state_to_ubo(old_state);
> >>                       old_vbo = drm_plane_state_to_vbo(old_state);
> >>                       if (ubo != old_ubo || vbo != old_vbo)
> >
> > thank you for the patches. I have applied patches 1 and 2, but with this
> > change UBO/VBO changes are ignored when switching from YU12 to YV12.
> 
> Good catch.  Does this change look okay, then?
> 
> -               if (old_fb) {
> +               if (old_fb &&
> +                   (old_fb->pixel_format == DRM_FORMAT_YUV420 ||
> +                    old_fb->pixel_format == DRM_FORMAT_YVU420)) {
> 
> >
> > Shouldn't we rather set crtc_state->mode_changed = true if either
> > (fb->pixel_format != old_fb->pixel_format) for any pixel format or
> > (ubo != old_ubo || vbo != old_vbo) for YUV formats, instead of returning
> > -EINVAL?
> 
> I thought about this and determined that this could be done
> in an additional patch later.
> It would be good if we change as little as we can in a patch
> with stable Cced.

Alright, the change you suggest above should work then.

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]