drm/rockchip: driver: crtc primary fb is for non atomic driver

meaningful for non-atomic drivers, for atomic drivers this is
forced to be NULL.

Change-Id: Ic3591c4f4c3ee6de53f89d0b4f230829b1ed056d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
Sandy Huang
2019-08-09 11:26:17 +08:00
committed by Tao Huang
parent f4af517045
commit 862a59c0dc
2 changed files with 2 additions and 11 deletions

View File

@@ -1483,7 +1483,6 @@ static int rockchip_drm_bind(struct device *dev)
s = to_rockchip_crtc_state(crtc->state);
if (is_support_hotplug(s->output_type)) {
s->crtc_primary_fb = crtc->primary->fb;
crtc->primary->fb = helper->fb;
drm_framebuffer_get(helper->fb);
}
@@ -1551,15 +1550,8 @@ static int rockchip_drm_open(struct drm_device *dev, struct drm_file *file)
{
struct drm_crtc *crtc;
drm_for_each_crtc(crtc, dev) {
struct rockchip_crtc_state *s = NULL;
s = to_rockchip_crtc_state(crtc->state);
if (s->crtc_primary_fb) {
crtc->primary->fb = s->crtc_primary_fb;
s->crtc_primary_fb = NULL;
}
}
drm_for_each_crtc(crtc, dev)
crtc->primary->fb = NULL;
return 0;
}

View File

@@ -121,7 +121,6 @@ struct rockchip_crtc_state {
int color_space;
int eotf;
struct rockchip_hdr_state hdr;
struct drm_framebuffer *crtc_primary_fb;
};
#define to_rockchip_crtc_state(s) \
container_of(s, struct rockchip_crtc_state, base)