mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
drm/rockchip: vop2: fix NULL point when dump regs or active_regs
when vp0 is disabled, the vop2->vps[0].rockchip_crtc.crtc.state is NULL. Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: I93b3ea4f3ddc6076f2105ebcabf7317627b602a3
This commit is contained in:
@@ -6326,7 +6326,8 @@ static void vop2_crtc_regs_dump(struct drm_crtc *crtc, struct seq_file *s)
|
||||
|
||||
/* only need to dump once at first active crtc for vop2 */
|
||||
for (i = 0; i < vop2_data->nr_vps; i++) {
|
||||
if (vop2->vps[i].rockchip_crtc.crtc.state->active) {
|
||||
if (vop2->vps[i].rockchip_crtc.crtc.state &&
|
||||
vop2->vps[i].rockchip_crtc.crtc.state->active) {
|
||||
first_active_crtc = &vop2->vps[i].rockchip_crtc.crtc;
|
||||
break;
|
||||
}
|
||||
@@ -6369,7 +6370,8 @@ static void vop2_crtc_active_regs_dump(struct drm_crtc *crtc, struct seq_file *s
|
||||
|
||||
/* only need to dump once at first active crtc for vop2 */
|
||||
for (i = 0; i < vop2_data->nr_vps; i++) {
|
||||
if (vop2->vps[i].rockchip_crtc.crtc.state->active) {
|
||||
if (vop2->vps[i].rockchip_crtc.crtc.state &&
|
||||
vop2->vps[i].rockchip_crtc.crtc.state->active) {
|
||||
first_active_crtc = &vop2->vps[i].rockchip_crtc.crtc;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user