From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xinliang Liu Subject: Re: Whats missing in my new FB DRM driver... "No connectors reported connected with modes"? Date: Tue, 19 Jan 2016 11:38:04 +0800 Message-ID: References: <5684268E.2000607@synopsys.com> <569CF78F.7050303@synopsys.com> <569CFA9B.4060108@synopsys.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1621087776==" Return-path: Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by gabe.freedesktop.org (Postfix) with ESMTPS id B6DF66E526 for ; Mon, 18 Jan 2016 19:38:06 -0800 (PST) Received: by mail-ob0-f169.google.com with SMTP id ba1so588586092obb.3 for ; Mon, 18 Jan 2016 19:38:06 -0800 (PST) In-Reply-To: <569CFA9B.4060108@synopsys.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Carlos Palminha Cc: linux-fbdev@vger.kernel.org, tomi.valkeinen@ti.com, laurent.pinchart@ideasonboard.com, dri-devel List-Id: dri-devel@lists.freedesktop.org --===============1621087776== Content-Type: multipart/alternative; boundary=047d7b33cea8e399c10529a79814 --047d7b33cea8e399c10529a79814 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 18 January 2016 at 22:45, Carlos Palminha wrote: > I'm also getting a message from DRM saying can't find any crtc or > sizes...i'm really missing something here. > :( > > -- log -- > [drm] Initialized drm 1.1.0 20060810 > drm-arcpgu e0017000.pgu: No connectors reported connected with modes > [drm] Cannot find any crtc or sizes - going 1024x768 > Console: switching to colour frame buffer device 128x48 > drm-arcpgu e0017000.pgu: fb0: frame buffer device > [drm] Initialized drm-arcpgu 1.0.0 20151127 on minor 0 > -- log --- > > Any help? > > Regards, > C.Palminha > > > On 18-01-2016 14:32, Carlos Palminha wrote: > > Hi Xinliang, > > > > My get_modes seems to be implemented as the rcar driver... > > Probably still missing some init step? > > > > Regards, > > C.Palminha > > > > > > static int arcpgu_drm_connector_get_modes(struct drm_connector > *connector) > > { > > struct drm_encoder_slave *slave; > > const struct drm_encoder_slave_funcs *sfuncs; > > struct arcpgu_drm_connector * con =3D > > container_of(connector, struct arcpgu_drm_connector, connector); > > > > slave =3D con->encoder_slave; > > if(slave =3D=3D NULL) { > > dev_err(connector->dev->dev, > > "connector_get_modes: cannot find slave encoder for connector\n"); > > return 0; > > } > > > > sfuncs =3D slave->slave_funcs; > > if(sfuncs->get_modes =3D=3D NULL){ > > return 0; > > } > > > > return sfuncs-> > =E2=80=8B=E2=80=8B > get_modes(&slave->base,connector); > > } > > > =E2=80=8Bso, this will call adv7511 driver's =E2=80=8B =E2=80=8B get_modes call back. I wonder if the system boot up, it can get modes or not. You can test it with the modetest. i.e. $ modetest -M DRM_DRIVER_NAME -c > > On 31-12-2015 02:19, Xinliang Liu wrote: > >> > >> > >> On 31 December 2015 at 02:46, Carlos Palminha > >> > > wrote: > >> > >> Hi guys, > >> > >> I'm writing a DRM driver for a framebuffer embedded hardware that > >> uses an i2c encoder (adv7511), following the basic steps suggested > >> by Laurent in "anatomy of an embedded KMS driver": > >> https://www.youtube.com/watch?v=3DJa8fM7rTae4 > >> > >> After initiliazing all kms, crtc, encoder, i2c, connector function= s > >> and structures i'm calling drm_fbdev_cma_init to create a fbdev. > >> > >> When booting i'm getting an error message saying "No connectors > >> reported connected with modes", but the driver init is ok and i ca= n > >> find the /dev/dri/* and /dev/fb0 devices. > >> > >> Any clue what i might be missing during the driver load? > >> > >> > >> =E2=80=8BI think you should check on the 'get_modes'=E2=80=8B call bac= k of adv7511 > >> driver. (Or, if possible show us the code.) > >> > >> Best, > >> -xinliang > >> > >> > >> Thanks... > >> > >> Regards, > >> C.Palminha > >> > >> --- boot log snippet --- > >> [drm] Initialized drm 1.1.0 20060810 > >> drm-arcpgu e0017000.pgu: No connectors reported connected with mod= es > >> [drm] Cannot find any crtc or sizes - going 1024x768 > >> Console: switching to colour frame buffer device 128x48 > >> drm-arcpgu e0017000.pgu: fb0: frame buffer device > >> [drm] Initialized drm-arcpgu 1.0.0 20151127 on minor 0 > >> --- boot log snippet --- > >> -- > >> To unsubscribe from this list: send the line "unsubscribe > >> linux-fbdev" in > >> the body of a message to majordomo@vger.kernel.org > >> > >> More majordomo info at http://vger.kernel.org/majordomo-info.html > >> > >> > --047d7b33cea8e399c10529a79814 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 18 January 2016 at 22:45, Carlos Palminha <CARL= OS.PALMINHA@synopsys.com> wrote:
I'm = also getting a message from DRM saying can't find any crtc or sizes...i= 'm really missing something here.
:(

-- log --
[drm] Initialized drm 1.1.0 20060810
drm-arcpgu e0017000.pgu: No connectors reported connected with modes
[drm] Cannot find any crtc or sizes - going 1024x768
Console: switching to colour frame buffer device 128x48
drm-arcpgu e0017000.pgu: fb0: frame buffer device
[drm] Initialized drm-arcpgu 1.0.0 20151127 on minor 0
-- log ---

Any help?

Regards,
C.Palminha


On 18-01-2016 14:32, Carlos Palminha wrote:
> Hi Xinliang,
>
> My get_modes seems to be implemented as the rcar driver...
> Probably still missing some init step?
>
> Regards,
> C.Palminha
>
>
> static int arcpgu_drm_connector_get_modes(struct drm_connector *connec= tor)
> {
> struct drm_encoder_slave *slave;
> const struct drm_encoder_slave_funcs *sfuncs;
> struct arcpgu_drm_connector * con =3D
> container_of(connector, struct arcpgu_drm_connector, connector);
>
> slave =3D con->encoder_slave;
> if(slave =3D=3D NULL) {
> dev_err(connector->dev->dev,
> "connector_get_modes: cannot find slave encoder for connector\n&q= uot;);
> return 0;
> }
>
> sfuncs =3D slave->slave_funcs;
> if(sfuncs->get_modes =3D=3D NULL){
> return 0;
> }
>
> return sfuncs->
=E2=80=8B=E2=80=8B
get_modes(= &slave->base,connector);
> }
>

=E2=80=8Bso, this w= ill call=C2=A0adv7511 driver's=C2=A0=E2=80=8B
=E2=80=8B
get_modes call back.
I wonder if the system boot up, it= can get modes or not.
You can test it with the modetest. i.e. $ modete= st -M DRM_DRIVER_NAME -c


=C2=A0
> On 31-12-2015 02:19, Xinliang Liu wrote:
>>
>>
>> On 31 December 2015 at 02:46, Carlos Palminha
>> <CARLOS.PALMINH= A@synopsys.com <mailto:CARLOS.PALMINHA@synopsys.com>> wrote:
>>
>>=C2=A0 =C2=A0 =C2=A0Hi guys,
>>
>>=C2=A0 =C2=A0 =C2=A0I'm writing a DRM driver for a framebuffer = embedded hardware that
>>=C2=A0 =C2=A0 =C2=A0uses an i2c encoder (adv7511), following the ba= sic steps suggested
>>=C2=A0 =C2=A0 =C2=A0by Laurent in "anatomy of an embedded KMS = driver":
>>=C2=A0 =C2=A0 =C2=A0https://www.youtube.com/wat= ch?v=3DJa8fM7rTae4
>>
>>=C2=A0 =C2=A0 =C2=A0After initiliazing all kms, crtc, encoder, i2c,= connector functions
>>=C2=A0 =C2=A0 =C2=A0and structures i'm calling drm_fbdev_cma_in= it to create a fbdev.
>>
>>=C2=A0 =C2=A0 =C2=A0When booting i'm getting an error message s= aying "No connectors
>>=C2=A0 =C2=A0 =C2=A0reported connected with modes", but the dr= iver init is ok and i can
>>=C2=A0 =C2=A0 =C2=A0find the /dev/dri/* and /dev/fb0 devices.
>>
>>=C2=A0 =C2=A0 =C2=A0Any clue what i might be missing during the dri= ver load?
>>
>>
>> =E2=80=8BI think you should check on the 'get_modes'=E2=80= =8B call back of adv7511
>> driver. (Or, if possible show us the code.)
>>
>> Best,
>> -xinliang
>>
>>
>>=C2=A0 =C2=A0 =C2=A0Thanks...
>>
>>=C2=A0 =C2=A0 =C2=A0Regards,
>>=C2=A0 =C2=A0 =C2=A0C.Palminha
>>
>>=C2=A0 =C2=A0 =C2=A0--- boot log snippet ---
>>=C2=A0 =C2=A0 =C2=A0[drm] Initialized drm 1.1.0 20060810
>>=C2=A0 =C2=A0 =C2=A0drm-arcpgu e0017000.pgu: No connectors reported= connected with modes
>>=C2=A0 =C2=A0 =C2=A0[drm] Cannot find any crtc or sizes - going 102= 4x768
>>=C2=A0 =C2=A0 =C2=A0Console: switching to colour frame buffer devic= e 128x48
>>=C2=A0 =C2=A0 =C2=A0drm-arcpgu e0017000.pgu: fb0:=C2=A0 frame buffe= r device
>>=C2=A0 =C2=A0 =C2=A0[drm] Initialized drm-arcpgu 1.0.0 20151127 on = minor 0
>>=C2=A0 =C2=A0 =C2=A0--- boot log snippet ---
>>=C2=A0 =C2=A0 =C2=A0--
>>=C2=A0 =C2=A0 =C2=A0To unsubscribe from this list: send the line &q= uot;unsubscribe
>>=C2=A0 =C2=A0 =C2=A0linux-fbdev" in
>>=C2=A0 =C2=A0 =C2=A0the body of a message to majordomo@vger.kernel.org
>>=C2=A0 =C2=A0 =C2=A0<mailto:majordomo@vger.kernel.org>
>>=C2=A0 =C2=A0 =C2=A0More majordomo info at http://= vger.kernel.org/majordomo-info.html
>>
>>

--047d7b33cea8e399c10529a79814-- --===============1621087776== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1621087776==--