mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
drm/virtio: Disable damage clipping if FB changed since last page-flip
commit0240db231d
upstream. The driver does per-buffer uploads and needs to force a full plane update if the plane's attached framebuffer has change since the last page-flip. Fixes:01f05940a9
("drm/virtio: Enable fb damage clips property for the primary plane") Cc: <stable@vger.kernel.org> # v6.4+ Reported-by: nerdopolis <bluescreen_avenger@verizon.net> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218115 Suggested-by: Sima Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Zack Rusin <zackr@vmware.com> Acked-by: Sima Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20231123221315.3579454-3-javierm@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
87b3b45ce7
commit
1055077473
1 changed files with 10 additions and 0 deletions
|
@ -79,6 +79,8 @@ static int virtio_gpu_plane_atomic_check(struct drm_plane *plane,
|
|||
{
|
||||
struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,
|
||||
plane);
|
||||
struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state,
|
||||
plane);
|
||||
bool is_cursor = plane->type == DRM_PLANE_TYPE_CURSOR;
|
||||
struct drm_crtc_state *crtc_state;
|
||||
int ret;
|
||||
|
@ -86,6 +88,14 @@ static int virtio_gpu_plane_atomic_check(struct drm_plane *plane,
|
|||
if (!new_plane_state->fb || WARN_ON(!new_plane_state->crtc))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Ignore damage clips if the framebuffer attached to the plane's state
|
||||
* has changed since the last plane update (page-flip). In this case, a
|
||||
* full plane update should happen because uploads are done per-buffer.
|
||||
*/
|
||||
if (old_plane_state->fb != new_plane_state->fb)
|
||||
new_plane_state->ignore_damage_clips = true;
|
||||
|
||||
crtc_state = drm_atomic_get_crtc_state(state,
|
||||
new_plane_state->crtc);
|
||||
if (IS_ERR(crtc_state))
|
||||
|
|
Loading…
Reference in a new issue