From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark yao Subject: Re: [PATCH v15 1/3] drm: rockchip: Add basic drm driver Date: Tue, 15 Mar 2016 09:30:22 +0800 Message-ID: <56E765AE.1000606@rock-chips.com> References: <1417511600-7054-1-git-send-email-mark.yao@rock-chips.com> <1417511739-7141-1-git-send-email-mark.yao@rock-chips.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Tomeu Vizoso Cc: =?UTF-8?B?SGVpa28gU3TDvGJuZXI=?= , Boris BREZILLON , David Airlie , Rob Clark , Daniel Vetter , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Randy Dunlap , Grant Likely , Greg Kroah-Hartman , John Stultz , Rom Lemarchand , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org" , "linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: linux-api@vger.kernel.org On 2016=E5=B9=B403=E6=9C=8814=E6=97=A5 21:35, Tomeu Vizoso wrote: > On 2 December 2014 at 10:15, Mark Yao wrote= : >> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/g= pu/drm/rockchip/rockchip_drm_vop.c >> new file mode 100644 >> index 0000000..e7ca25b >> --- /dev/null >> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c >> @@ -0,0 +1,1455 @@ > ... >> +static bool vop_crtc_mode_fixup(struct drm_crtc *crtc, >> + const struct drm_display_mode *mode, >> + struct drm_display_mode *adjusted_mo= de) >> +{ >> + if (adjusted_mode->htotal =3D=3D 0 || adjusted_mode->vtotal = =3D=3D 0) >> + return false; > Hi Mark, > > what's the rationale for this? > > Disabling a CRTC as in [0] will cause mode_fixup() to be called with > an empty mode, failing that test. > > Removing the check seems to get things working fine for a short while= , > but a later modeset invariably gets the VOP to hang (as reported by > [1]). > > Do you know why that check was put in place and what exactly could be > causing the hw to hang? > > [0] https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/tree/lib/ig= t_kms.c#n1616 > [1] https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/= tree/drivers/gpu/drm/rockchip/rockchip_drm_vop.c#n873 > > Thanks, > > Tomeu > Hi Tomeu Just thinking that "adjusted_mode->htotal =3D=3D 0 || adjusted_mode->vt= otal=20 =3D=3D 0" is not a good mode for vop. And you said VOP hang, only WARN_ON error message? or system hang, die? I think maybe crtc disable too fast, vblank is off, then no one can fee= d the wait_update_complete. Can you test it again with following patch? drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -503,6 +503,8 @@ static void vop_crtc_disable(struct drm_crtc *crtc) if (!vop->is_enabled) return; =20 + vop_crtc_wait_for_update(crtc); + drm_crtc_vblank_off(crtc); Thanks. --=20 =EF=BC=ADark Yao -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html