disp: msm: sde: remove fb's attached to a drm_file in preclose
This change avoids upstream drm issuing drm_atomic_commit in drm_fb_release which is leading to artifacts on screen or atomic_check failures due to atomically unstaging each fb from plane_state and committing remaining planes on hardware. a) This patch moves the state operations for setting crtc to connector state to a helper api. b) This patch clears any dim_layers present in the crtc_state as part of null commit. c) This patch removes any framebuffers attached to a drm_file in msm_preclose whose refcount is not managed by composer kill inadvertently and issues null flush to hardware in such cases. d) This patch handles msm_preclose as part of msm_release operation since legacy feature is not supported for msm_driver. Change-Id: Ib2068d74d4b23b73b7c84544858c9f6bb6adfa67 Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org> Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Samantha Tran

vecāks
2df01bf3aa
revīzija
0e3d422520
@@ -45,6 +45,7 @@
|
||||
#include <drm/drm_ioctl.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
#include <drm/drm_drv.h>
|
||||
#include <drm/drm_auth.h>
|
||||
#include <drm/drm_probe_helper.h>
|
||||
|
||||
#include "msm_drv.h"
|
||||
@@ -1480,6 +1481,14 @@ static int msm_release(struct inode *inode, struct file *filp)
|
||||
kfree(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle preclose operation here for removing fb's whose
|
||||
* refcount > 1. This operation is not triggered from upstream
|
||||
* drm as msm_driver does not support DRIVER_LEGACY feature.
|
||||
*/
|
||||
if (drm_is_current_master(file_priv))
|
||||
msm_preclose(dev, file_priv);
|
||||
|
||||
return drm_release(inode, filp);
|
||||
}
|
||||
|
||||
@@ -1684,7 +1693,6 @@ static struct drm_driver msm_driver = {
|
||||
DRIVER_ATOMIC |
|
||||
DRIVER_MODESET,
|
||||
.open = msm_open,
|
||||
.preclose = msm_preclose,
|
||||
.postclose = msm_postclose,
|
||||
.lastclose = msm_lastclose,
|
||||
.irq_handler = msm_irq,
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user