From patchwork Wed Jan 20 01:24:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinliang Liu X-Patchwork-Id: 60002 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2901493lbb; Tue, 19 Jan 2016 17:24:36 -0800 (PST) X-Received: by 10.98.16.72 with SMTP id y69mr48654891pfi.95.1453253076625; Tue, 19 Jan 2016 17:24:36 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id r72si51243973pfb.1.2016.01.19.17.24.36; Tue, 19 Jan 2016 17:24:36 -0800 (PST) Received-SPF: pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92B5F89D64; Tue, 19 Jan 2016 17:24:34 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by gabe.freedesktop.org (Postfix) with ESMTPS id B7BD089D64 for ; Tue, 19 Jan 2016 17:24:32 -0800 (PST) Received: by mail-ob0-f180.google.com with SMTP id py5so234806663obc.2 for ; Tue, 19 Jan 2016 17:24:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=KLCfrgTGrNIg4fDFhiHaAs2sfutfW62jV0+ZorHE/Lo=; b=ekho6WaMNLVlzXW3VtB5RIzKDQ9TTbUvkXb+vKw4tlnYnXvOh0c/Ckuork+gXF07/W B6G8QqIqyfcfFaZIVydtuvwnG8I8puT2pU4PA2SbjWUpkhDYI2+qjjBTBmovFIwxoJdz dipiVVEx3DlWxtEcFQCPQrbMj5EVkXOhlSwDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=KLCfrgTGrNIg4fDFhiHaAs2sfutfW62jV0+ZorHE/Lo=; b=bMGZ+BLz7a7nfxFUO6QDmhYMo7NIb+a4D+5Qw9YSG2sCeNNPv3NUX18qYhZGiXudpu R8k6ieCxtp+N2+8DoN3AvEVZ/WdILayae1xVYPemDOosDGAwxAPBG2owQBjz1X9RtWy8 0h8JBpHoYBC7/8t7OoM0RAVs3vMxI5wgViecX+26DMqX0CNDeGFDYVsp/q9G9epvMLE2 CJtFhDKuwEltdk0K5RlzaKZbm2iCmgFXv7jrxq35kTu0MubsFWvSpi84qkbVQF8dNzIC Wt325Xukq9ZA5izcjekqTB1yvSAQhFziPVBULYNgprPY1d66J3NMkh7R/h+nnHPKmId4 ZJug== X-Gm-Message-State: ALoCoQm5U2RSB7o+Jcq4FOuDzvQVmVOQqyQNdhAkcej6iPQAaDlmG/rEuhvqkCBKHglA6AGOo9qZoRai5kzOuxJyOlzYpt0hiP5zPpLzmChTfjGzgmmxOBc= MIME-Version: 1.0 X-Received: by 10.60.146.237 with SMTP id tf13mr25384277oeb.70.1453253071810; Tue, 19 Jan 2016 17:24:31 -0800 (PST) Received: by 10.76.124.102 with HTTP; Tue, 19 Jan 2016 17:24:31 -0800 (PST) In-Reply-To: <569E69EB.3010003@synopsys.com> References: <5684268E.2000607@synopsys.com> <569CF78F.7050303@synopsys.com> <569CFA9B.4060108@synopsys.com> <569E5E51.8000303@synopsys.com> <569E69EB.3010003@synopsys.com> Date: Wed, 20 Jan 2016 09:24:31 +0800 Message-ID: Subject: Re: Whats missing in my new FB DRM driver... "No connectors reported connected with modes"? From: Xinliang Liu To: Carlos Palminha Cc: linux-fbdev@vger.kernel.org, tomi.valkeinen@ti.com, Alexey Brodkin , laurent.pinchart@ideasonboard.com, dri-devel X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 20 January 2016 at 00:52, Carlos Palminha wrote: > when i boot the kernel and connect the HDMI cable after booting i can retrieve 4 modes... :) > > if i boot linux with the HDMI cable inserted the kernel hangs. What's the hang kernel log. Is it a oops? > Possible relation with HPD? Yes, I think there might be something wrong with the HPD interrupt or the EDID ready interrupt. I do meet the similar issue before when I using the upstream adv7511 driver to enable adv7533. I found that the HPD and EDID interrupt is not reliable. In order to get modes stably, I have to add some delay like bellow: --- -- Best, -xinliang > > Regards, > C.Palminha > > # modetest -M drm-arcpgu -c > Connectors: > id encoder status type size (mm) modes encoders > 21 0 connected HDMI-A 0x0 4 20 > modes: > name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot) > 800x600 60 800 840 968 1056 600 601 605 628 flags: phsync, pvsync; type: driver > 800x600 56 800 824 896 1024 600 601 603 625 flags: phsync, pvsync; type: driver > 848x480 60 848 864 976 1088 480 486 494 517 flags: phsync, pvsync; type: driver > 640x480 60 640 656 752 800 480 490 492 525 flags: nhsync, nvsync; type: driver > props: > 1 EDID: > flags: immutable blob > blobs: > > value: > 2 DPMS: > flags: enum > enums: On=0 Standby=1 Suspend=2 Off=3 > value: 0 > > # > > On 19-01-2016 16:03, Carlos Palminha wrote: >> Hi Xiang, >> >> Its returning 0 modes... :( >> >> Regards, >> C.Palminha >> >> # modetest -M drm-arcpgu -c >> Connectors: >> id encoder status type size (mm) modes encoders >> 21 0 disconnected HDMI-A 0x0 0 20 >> props: >> 1 EDID: >> flags: immutable blob >> blobs: >> >> value: >> 2 DPMS: >> flags: enum >> enums: On=0 Standby=1 Suspend=2 Off=3 >> value: 0 >> >> # >> >> On 19-01-2016 03:38, Xinliang Liu wrote: >>> 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 = >>>>> container_of(connector, struct arcpgu_drm_connector, connector); >>>>> >>>>> slave = con->encoder_slave; >>>>> if(slave == NULL) { >>>>> dev_err(connector->dev->dev, >>>>> "connector_get_modes: cannot find slave encoder for connector\n"); >>>>> return 0; >>>>> } >>>>> >>>>> sfuncs = slave->slave_funcs; >>>>> if(sfuncs->get_modes == NULL){ >>>>> return 0; >>>>> } >>>>> >>>>> return sfuncs-> >>>> >>>> get_modes(&slave->base,connector); >>>>> } >>>>> >>>> >>> >>> so, this will call adv7511 driver's >>> >>> 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=Ja8fM7rTae4 >>>>>> >>>>>> After initiliazing all kms, crtc, encoder, i2c, connector functions >>>>>> 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 can >>>>>> find the /dev/dri/* and /dev/fb0 devices. >>>>>> >>>>>> Any clue what i might be missing during the driver load? >>>>>> >>>>>> >>>>>> I think you should check on the 'get_modes' call back 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 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 >>>>>> --- 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 >>>>>> >>>>>> >>>> >>> --- a/drivers/gpu/drm/i2c/adv7511.c +++ b/drivers/gpu/drm/i2c/adv7511.c @@ -657,6 +657,8 @@ static int adv7511_get_modes(struct adv7511 *adv7511, regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, ADV7511_POWER_POWER_DOWN, 0); adv7511->current_edid_segment = -1; + /* wait some time for edid is ready */ + msleep(200); } edid = drm_do_get_edid(connector, adv7511_get_edid_block, adv7511);