Re: imxdrm issue on Hummingboard with LVDS enabled

2017-02-13 Thread Russell King - ARM Linux
On Mon, Feb 13, 2017 at 09:17:49AM +0100, Thierry Reding wrote:
> Of course, the above still requires that the core messages output the
> name along with the ID.

Thankfully, that's not a very big patch.  I'll post it later today.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: imxdrm issue on Hummingboard with LVDS enabled

2017-02-13 Thread Thierry Reding
On Sun, Feb 12, 2017 at 01:42:38PM +, Russell King - ARM Linux wrote:
> On Sun, Feb 12, 2017 at 01:18:54PM +, Russell King - ARM Linux wrote:
> > Hi,
> > 
> > Here's another issue with imxdrm.  I got this while trying to reproduce
> > Dan's problem by enabling the lvds output using the patch below
> > originally from Fabio, but updated a bit.  This doesn't occur if I leave
> > LVDS disabled.
> > 
> > The taint is due to the IMX capture modules from Steve, who chose to put
> > his code in drivers/staging/media rather than drivers/media.  However,
> > the last module to make the capture stuff active (imx-csi) which interfaces
> > the drivers/gpu/ipu-v3 code with the capture code has not been loaded.
> > 
> > [ cut here ]
> > WARNING: CPU: 1 PID: 1049 at 
> > /home/rmk/git/linux-rmk/drivers/gpu/drm/drm_atomic_helper.c:1149 
> > drm_atomic_helper_wait_for_vblanks+0x218/0x224
> > [CRTC:29] vblank wait timed out
> 
> Can someone please explain to me how you go from something like
> "[CRTC:29]" to something meaningful, such as identifying which
> exact CRTC failed here?
> 
> Given that the ID numbers given out by DRM for individual components
> come from the dev->mode_config.crtc_idr IDR, without knowing in
> exact detail the precise registration order of these objects with
> drm_mode_object_get(), printing "[CRTC:29]" is utterly meaningless -
> it conveys zero useful information.  DRM might as well be printing
> random numbers instead.
> 
> At least the pre-atomic DRM code printed crtc->name as well, which
> would at least indicate which _CRTC_ in numeric order of registration
> was the cause, which is slightly easier to guess which hardware CRTC
> in question caused the problem.
> 
> Some consistency in DRM land would be nice...

I suppose we could add an optional struct device * to struct drm_crtc
(and possibly struct drm_encoder, struct drm_connector, ...) and take
the name from that to make it more obvious where this is coming from.

Alternatively, you can use the "name" parameter when calling
drm_crtc_init_with_planes() in order to provide a specific name rather
than using the crtc-%d fallback. You could pass dev_name(>dev),
or whatever, to make it clear.

Of course, the above still requires that the core messages output the
name along with the ID.

Thierry


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: imxdrm issue on Hummingboard with LVDS enabled

2017-02-12 Thread Fabio Estevam
Hi Russell,

On Sun, Feb 12, 2017 at 11:18 AM, Russell King - ARM Linux
 wrote:
> Hi,
>
> Here's another issue with imxdrm.  I got this while trying to reproduce
> Dan's problem by enabling the lvds output using the patch below
> originally from Fabio, but updated a bit.  This doesn't occur if I leave
> LVDS disabled.
>
> The taint is due to the IMX capture modules from Steve, who chose to put
> his code in drivers/staging/media rather than drivers/media.  However,
> the last module to make the capture stuff active (imx-csi) which interfaces
> the drivers/gpu/ipu-v3 code with the capture code has not been loaded.
>
> [ cut here ]
> WARNING: CPU: 1 PID: 1049 at 
> /home/rmk/git/linux-rmk/drivers/gpu/drm/drm_atomic_helper.c:1149 
> drm_atomic_helper_wait_for_vblanks+0x218/0x224
> [CRTC:29] vblank wait timed out

I am getting the same warning when trying to add HDMI support on
imx6sx-udoo-neo board via TDA19988:

[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
tda998x 2-0070: Falling back to first CRTC
random: fast init done
tda998x 2-0070: found TDA19988
mxsfb 222.lcdif: bound 2-0070 (ops tda998x_ops)
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
 [ cut here ]
WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_atomic_helper.c:1149
drm_atomic_helper_wait_for_vblanks+00
[CRTC:26] vblank wait timed out
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.10.0-rc7-00034-g2217172 #155
Hardware name: Freescale i.MX6 SoloX (Device Tree)
Backtrace:
[] (dump_backtrace) from [] (show_stack+0x18/0x1c)
r7: r6:6013 r5: r4:c0e29258
[] (show_stack) from [] (dump_stack+0xb4/0xe8)
[] (dump_stack) from [] (__warn+0xd8/0x104)
r9:c04d63ac r8:047d r7:0009 r6:c0c1f2b4 r5: r4:ef05f8c8
[] (__warn) from [] (warn_slowpath_fmt+0x3c/0x44)
r9:ef35 r8:ef037028 r7: r6:ef3bd600 r5:ef3d2c00 r4:c0c1f3d0
[] (warn_slowpath_fmt) from []
(drm_atomic_helper_wait_for_vblanks+0x230/0x240)
r3:001a r2:c0c1f3d0
r4:
[] (drm_atomic_helper_wait_for_vblanks) from []
(drm_atomic_helper_commit_tail+0x50)
r10:0001 r9:ef3cd100 r8:ef350484 r7:ef35 r6: r5:ef35
r4:ef3d2c00


I haven't had a chance to debug this yet. If anyone makes any
progress, please keep me on Cc.

Thanks
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: imxdrm issue on Hummingboard with LVDS enabled

2017-02-12 Thread Russell King - ARM Linux
On Sun, Feb 12, 2017 at 01:18:54PM +, Russell King - ARM Linux wrote:
> Hi,
> 
> Here's another issue with imxdrm.  I got this while trying to reproduce
> Dan's problem by enabling the lvds output using the patch below
> originally from Fabio, but updated a bit.  This doesn't occur if I leave
> LVDS disabled.
> 
> The taint is due to the IMX capture modules from Steve, who chose to put
> his code in drivers/staging/media rather than drivers/media.  However,
> the last module to make the capture stuff active (imx-csi) which interfaces
> the drivers/gpu/ipu-v3 code with the capture code has not been loaded.
> 
> [ cut here ]
> WARNING: CPU: 1 PID: 1049 at 
> /home/rmk/git/linux-rmk/drivers/gpu/drm/drm_atomic_helper.c:1149 
> drm_atomic_helper_wait_for_vblanks+0x218/0x224
> [CRTC:29] vblank wait timed out

Can someone please explain to me how you go from something like
"[CRTC:29]" to something meaningful, such as identifying which
exact CRTC failed here?

Given that the ID numbers given out by DRM for individual components
come from the dev->mode_config.crtc_idr IDR, without knowing in
exact detail the precise registration order of these objects with
drm_mode_object_get(), printing "[CRTC:29]" is utterly meaningless -
it conveys zero useful information.  DRM might as well be printing
random numbers instead.

At least the pre-atomic DRM code printed crtc->name as well, which
would at least indicate which _CRTC_ in numeric order of registration
was the cause, which is slightly easier to guess which hardware CRTC
in question caused the problem.

Some consistency in DRM land would be nice...

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


imxdrm issue on Hummingboard with LVDS enabled

2017-02-12 Thread Russell King - ARM Linux
Hi,

Here's another issue with imxdrm.  I got this while trying to reproduce
Dan's problem by enabling the lvds output using the patch below
originally from Fabio, but updated a bit.  This doesn't occur if I leave
LVDS disabled.

The taint is due to the IMX capture modules from Steve, who chose to put
his code in drivers/staging/media rather than drivers/media.  However,
the last module to make the capture stuff active (imx-csi) which interfaces
the drivers/gpu/ipu-v3 code with the capture code has not been loaded.

[ cut here ]
WARNING: CPU: 1 PID: 1049 at 
/home/rmk/git/linux-rmk/drivers/gpu/drm/drm_atomic_helper.c:1149 
drm_atomic_helper_wait_for_vblanks+0x218/0x224
[CRTC:29] vblank wait timed out
Modules linked in: imx_camif(C) imx_ic(C) imx_smfc(C) caam_jr uvcvideo 
snd_soc_imx_sgtl5000 snd_soc_fsl_asoc_card snd_soc_imx_spdif imx_media(C) 
snd_soc_imx_audmux imx_mipi_csi2(C) imx_media_core(C) snd_soc_sgtl5000 imx219 
caam imx_sdma video_multiplexer imx2_wdt coda v4l2_mem2mem videobuf2_v4l2 
videobuf2_dma_contig snd_soc_fsl_spdif videobuf2_core snd_soc_fsl_ssi 
imx_pcm_dma videobuf2_vmalloc videobuf2_memops imx_thermal nfsd 
rc_pinnacle_pctv_hd dw_hdmi_cec dw_hdmi_ahb_audio imx_ldb etnaviv
CPU: 1 PID: 1049 Comm: Xorg Tainted: G C  4.10.0-rc7+ #2106
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
Backtrace: 
[] (dump_backtrace) from [] (show_stack+0x18/0x1c)
 r6:600f0013 r5: r4: r3:
[] (show_stack) from [] (dump_stack+0xa4/0xdc)
[] (dump_stack) from [] (__warn+0xdc/0x108)
 r6:c08db088 r5: r4:ee9a5c98 r3:d039ee40
[] (__warn) from [] (warn_slowpath_fmt+0x40/0x48)
 r10:d01d5018 r8:00b0 r7:d01d4000 r6:eea7d000 r5:eaab4480 r4:0001
[] (warn_slowpath_fmt) from [] 
(drm_atomic_helper_wait_for_vblanks+0x218/0x224)
 r3:001d r2:c08db1b4
[] (drm_atomic_helper_wait_for_vblanks) from [] 
(imx_drm_atomic_commit_tail+0x50/0x60)
 r10:d02be400 r9:eaab4a00 r8: r7:d01d4000 r6: r5:d01d4000
 r4:eaab4480
[] (imx_drm_atomic_commit_tail) from [] 
(commit_tail+0x48/0x94)
 r5:c0a456a4 r4:eaab4480
[] (commit_tail) from [] 
(drm_atomic_helper_commit+0xc4/0x150)
 r5: r4:eaab4480
[] (drm_atomic_helper_commit) from [] 
(drm_atomic_commit+0x4c/0x60)
 r8:ed57f000 r7:ee9a5dd8 r6:d01d4000 r5: r4:eaab4480 r3:c03daf04
[] (drm_atomic_commit) from [] 
(drm_atomic_helper_set_config+0x80/0xd0)
 r6:d01d5018 r5: r4:eaab4480 r3:0004
[] (drm_atomic_helper_set_config) from [] 
(drm_mode_set_config_internal+0x60/0xe4)
 r7:d01d5018 r6:d01d4000 r5:eaab4a00 r4:ed57f000
[] (drm_mode_set_config_internal) from [] 
(drm_mode_setcrtc+0xdc/0x47c)
 r7:0001 r6:d01d4000 r5:eaab4a00 r4:ee9a5e58
[] (drm_mode_setcrtc) from [] (drm_ioctl+0x204/0x41c)
 r10:c06864a2 r9:d01d4000 r8:c07495a0 r7:ee9a5e58 r6:d03e3400 r5:0068
 r4:
[] (drm_ioctl) from [] (do_vfs_ioctl+0x98/0x9a0)
 r10:ed4ba068 r9:ee9a4000 r8:be9fa5c0 r7:0008 r6:0008 r5:ee1a4500
 r4:c018961c
[] (do_vfs_ioctl) from [] (SyS_ioctl+0x3c/0x60)
 r10: r9:ee9a4000 r8:be9fa5c0 r7:0008 r6:c06864a2 r5:ee1a4500
 r4:ee1a4500
[] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x1c)
 r8:c000ff04 r7:0036 r6:c06864a2 r5:be9fa5c0 r4:b6c4ace8 r3:0001
---[ end trace e9cdd5f49e5cc87f ]---


diff --git a/arch/arm/boot/dts/imx6dl-hummingboard.dts 
b/arch/arm/boot/dts/imx6dl-hummingboard.dts
index d5c966031962..9f605d14c50f 100644
--- a/arch/arm/boot/dts/imx6dl-hummingboard.dts
+++ b/arch/arm/boot/dts/imx6dl-hummingboard.dts
@@ -48,3 +48,10 @@
model = "SolidRun HummingBoard Solo/DualLite";
compatible = "solidrun,hummingboard/dl", "fsl,imx6dl";
 };
+
+ {
+   assigned-clocks = < IMX6QDL_CLK_LDB_DI0_SEL>,
+ < IMX6QDL_CLK_LDB_DI1_SEL>;
+   assigned-clock-parents = < IMX6QDL_CLK_PLL3_USB_OTG>,
+< IMX6QDL_CLK_PLL3_USB_OTG>;
+};
diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi 
b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
index d6c2358ffad4..258107246d64 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard.dtsi
@@ -302,3 +302,28 @@
cd-gpios = < 4 GPIO_ACTIVE_LOW>;
status = "okay";
 };
+
+ {
+   status = "okay";
+
+   lvds-channel@1 {
+   fsl,data-mapping = "spwg";
+   fsl,data-width = <18>;
+   status = "okay";
+
+   display-timings {
+   native-mode = <>;
+   timing0: hsd100pxn1 {
+   clock-frequency = <6500>;
+   hactive = <1024>;
+   vactive = <768>;
+   hback-porch = <220>;
+   hfront-porch = <40>;
+   vback-porch = <21>;
+   vfront-porch = <7>;
+   hsync-len = <60>;
+

Re: imxdrm issue on Hummingboard with LVDS enabled

2017-02-12 Thread Russell King - ARM Linux
On Sun, Feb 12, 2017 at 01:42:38PM +, Russell King - ARM Linux wrote:
> On Sun, Feb 12, 2017 at 01:18:54PM +, Russell King - ARM Linux wrote:
> > Hi,
> > 
> > Here's another issue with imxdrm.  I got this while trying to reproduce
> > Dan's problem by enabling the lvds output using the patch below
> > originally from Fabio, but updated a bit.  This doesn't occur if I leave
> > LVDS disabled.
> > 
> > The taint is due to the IMX capture modules from Steve, who chose to put
> > his code in drivers/staging/media rather than drivers/media.  However,
> > the last module to make the capture stuff active (imx-csi) which interfaces
> > the drivers/gpu/ipu-v3 code with the capture code has not been loaded.
> > 
> > [ cut here ]
> > WARNING: CPU: 1 PID: 1049 at 
> > /home/rmk/git/linux-rmk/drivers/gpu/drm/drm_atomic_helper.c:1149 
> > drm_atomic_helper_wait_for_vblanks+0x218/0x224
> > [CRTC:29] vblank wait timed out
> 
> Can someone please explain to me how you go from something like
> "[CRTC:29]" to something meaningful, such as identifying which
> exact CRTC failed here?
> 
> Given that the ID numbers given out by DRM for individual components
> come from the dev->mode_config.crtc_idr IDR, without knowing in
> exact detail the precise registration order of these objects with
> drm_mode_object_get(), printing "[CRTC:29]" is utterly meaningless -
> it conveys zero useful information.  DRM might as well be printing
> random numbers instead.
> 
> At least the pre-atomic DRM code printed crtc->name as well, which
> would at least indicate which _CRTC_ in numeric order of registration
> was the cause, which is slightly easier to guess which hardware CRTC
> in question caused the problem.
> 
> Some consistency in DRM land would be nice...

Eventually, we get:

WARNING: CPU: 1 PID: 1049 at 
/home/rmk/git/linux-rmk/drivers/gpu/drm/drm_atomic_helper.c:1151 
drm_atomic_helper_wait_for_vblanks+0x220/0x22c
[CRTC:26:crtc-0] vblank wait timed out

which is the "crtc" providing the HDMI output, and there is no HDMI
output anymore.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel