Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1357736

Re: [PATCH v15 1/3] drm: rockchip: Add basic drm driver

From Mark yao <mark.yao@rock-chips.com>
Newsgroups linux.kernel
Subject Re: [PATCH v15 1/3] drm: rockchip: Add basic drm driver
Date 2016-03-15 02:40 +0100
Message-ID <rcM7M-3sq-7@gated-at.bofh.it> (permalink)
References <osRMJ-8bM-3@gated-at.bofh.it> <osRMJ-8bM-1@gated-at.bofh.it> <rcB2F-4px-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016年03月14日 21:35, Tomeu Vizoso wrote:
> On 2 December 2014 at 10:15, Mark Yao <mark.yao@rock-chips.com> wrote:
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/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_mode)
>> +{
>> +       if (adjusted_mode->htotal == 0 || adjusted_mode->vtotal == 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/igt_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 == 0 || adjusted_mode->vtotal 
== 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 feed 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;
  
+       vop_crtc_wait_for_update(crtc);
+
         drm_crtc_vblank_off(crtc);

Thanks.

-- 
Mark Yao

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v15 1/3] drm: rockchip: Add basic drm driver Tomeu Vizoso <tomeu@tomeuvizoso.net> - 2016-03-14 14:50 +0100
  Re: [PATCH v15 1/3] drm: rockchip: Add basic drm driver Mark yao <mark.yao@rock-chips.com> - 2016-03-15 02:40 +0100
    Re: [PATCH v15 1/3] drm: rockchip: Add basic drm driver Tomeu Vizoso <tomeu@tomeuvizoso.net> - 2016-03-16 16:30 +0100
      Re: [PATCH v15 1/3] drm: rockchip: Add basic drm driver Tomeu Vizoso <tomeu@tomeuvizoso.net> - 2016-03-17 15:00 +0100

csiph-web