From: Ramiro Oliveira Subject: Re: [PATCH v2] drm/arcpgu: Accommodate adv7511 switch to DRM bridge Date: Fri, 21 Oct 2016 15:41:40 +0100 Message-ID: Reply-To: 1476863178-15237-1-git-send-email-Eugeniy.Paltsev@synopsys.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0013992023==" Return-path: Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.47.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6BACD6ED45 for ; Fri, 21 Oct 2016 14:50:08 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org Cc: Alexey.Brodkin@synopsys.com, linux-kernel@vger.kernel.org, CARLOS.PALMINHA@synopsys.com, linux-snps-arc@lists.infradead.org, Eugeniy.Paltsev@synopsys.com List-Id: dri-devel@lists.freedesktop.org --===============0013992023== Content-Type: multipart/alternative; boundary="------------4568C0D9A5E9B82418B6A79D" --------------4568C0D9A5E9B82418B6A79D Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 10/19/2016 01:16 PM, Eugeniy Paltsev wrote: > ARC PGU driver starts crashing on initialization after > 'commit e12c2f645557 ("drm/i2c: adv7511: Convert to drm_bridge")' > This happenes because in "arcpgu_drm_hdmi_init" function we get pointer > of "drm_i2c_encoder_driver" structure, which doesn't exist after > adv7511 hdmi encoder interface changed from slave encoder to drm bridge. > So, when we call "encoder_init" function from this structure driver > crashes. > > Bootlog: > ------------------------------------->8-------------------------------- > [drm] Initialized drm 1.1.0 20060810 > arcpgu e0017000.pgu: arc_pgu ID: 0xabbabaab > arcpgu e0017000.pgu: assigned reserved memory node frame_buffer@9e000000 > Path: (null) > CPU: 0 PID: 1 Comm: swapper Not tainted 4.8.0-00001-gb5642252fa01-dirty #8 > task: 9a058000 task.stack: 9a032000 > > [ECR ]: 0x00220100 => Invalid Read @ 0x00000004 by insn @ 0x803934e8 > [EFA ]: 0x00000004 > [BLINK ]: drm_atomic_helper_connector_dpms+0xa6/0x230 > [ERET ]: drm_atomic_helper_connector_dpms+0xa4/0x230 > [STAT32]: 0x00000846 : K DE E2 E1 > BTA: 0x8016d949 SP: 0x9a033e34 FP: 0x00000000 > LPS: 0x8036f6fc LPE: 0x8036f700 LPC: 0x00000000 > r00: 0x8063c118 r01: 0x805b98ac r02: 0x00000b11 > r03: 0x00000000 r04: 0x9a010f54 r05: 0x00000000 > r06: 0x00000001 r07: 0x00000000 r08: 0x00000028 > r09: 0x00000001 r10: 0x00000007 r11: 0x00000054 > r12: 0x720a3033 > > Stack Trace: > drm_atomic_helper_connector_dpms+0xa4/0x230 > arcpgu_drm_hdmi_init+0xbc/0x228 > arcpgu_probe+0x168/0x244 > platform_drv_probe+0x26/0x64 > really_probe+0x1f0/0x32c > __driver_attach+0xa8/0xd0 > bus_for_each_dev+0x3c/0x74 > bus_add_driver+0xc2/0x184 > driver_register+0x50/0xec > do_one_initcall+0x3a/0x120 > kernel_init_freeable+0x108/0x1a0 > ------------------------------------->8-------------------------------- > > Fix ARC PGU driver to be able work with drm bridge hdmi encoder > interface. The hdmi connector code isn't needed anymore as we expect > the adv7511 bridge driver to create/manage the connector. Tested-by: Ramiro Oliveira --------------4568C0D9A5E9B82418B6A79D Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit On 10/19/2016 01:16 PM, Eugeniy Paltsev wrote:
ARC PGU driver starts crashing on initialization after
'commit e12c2f645557 ("drm/i2c: adv7511: Convert to drm_bridge")'
This happenes because in "arcpgu_drm_hdmi_init" function we get pointer
of "drm_i2c_encoder_driver" structure, which doesn't exist after
adv7511 hdmi encoder interface changed from slave encoder to drm bridge.
So, when we call "encoder_init" function from this structure driver
crashes.

Bootlog:
------------------------------------->8--------------------------------
[drm] Initialized drm 1.1.0 20060810
arcpgu e0017000.pgu: arc_pgu ID: 0xabbabaab
arcpgu e0017000.pgu: assigned reserved memory node frame_buffer@9e000000
Path: (null)
CPU: 0 PID: 1 Comm: swapper Not tainted 4.8.0-00001-gb5642252fa01-dirty #8
task: 9a058000 task.stack: 9a032000

[ECR   ]: 0x00220100 => Invalid Read @ 0x00000004 by insn @ 0x803934e8
[EFA   ]: 0x00000004
[BLINK ]: drm_atomic_helper_connector_dpms+0xa6/0x230
[ERET  ]: drm_atomic_helper_connector_dpms+0xa4/0x230
[STAT32]: 0x00000846 : K DE       E2 E1
BTA: 0x8016d949  SP: 0x9a033e34  FP: 0x00000000
LPS: 0x8036f6fc LPE: 0x8036f700 LPC: 0x00000000
r00: 0x8063c118 r01: 0x805b98ac r02: 0x00000b11
r03: 0x00000000 r04: 0x9a010f54 r05: 0x00000000
r06: 0x00000001 r07: 0x00000000 r08: 0x00000028
r09: 0x00000001 r10: 0x00000007 r11: 0x00000054
r12: 0x720a3033

Stack Trace:
  drm_atomic_helper_connector_dpms+0xa4/0x230
  arcpgu_drm_hdmi_init+0xbc/0x228
  arcpgu_probe+0x168/0x244
  platform_drv_probe+0x26/0x64
  really_probe+0x1f0/0x32c
  __driver_attach+0xa8/0xd0
  bus_for_each_dev+0x3c/0x74
  bus_add_driver+0xc2/0x184
  driver_register+0x50/0xec
  do_one_initcall+0x3a/0x120
  kernel_init_freeable+0x108/0x1a0
------------------------------------->8--------------------------------

Fix ARC PGU driver to be able work with drm bridge hdmi encoder
interface. The hdmi connector code isn't needed anymore as we expect
the adv7511 bridge driver to create/manage the connector.
Tested-by: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com>
--------------4568C0D9A5E9B82418B6A79D-- --===============0013992023== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0013992023==--