Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4009899ybb; Mon, 13 Apr 2020 21:33:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKqf2j3fYg75g3Ww0f8necmAlIZEZG1kGptYfTRJspSCTXbYDmUKbbFxcHBUg0yE/VpKKUa X-Received: by 2002:a17:906:c839:: with SMTP id dd25mr2026980ejb.164.1586838796857; Mon, 13 Apr 2020 21:33:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586838796; cv=none; d=google.com; s=arc-20160816; b=Uw6Ak9Y5cM/U+kiaL98nb06hbQwj9YVStzjvg+BE5uZoAD8sNScgEpaQKte/S7y0YW g10yZUvmSxRuY03WMYQ/6DZoEKirCCEV672PymVVa9wP8bvxp+0G+cVbCxqpwMYKgi+H /CW7RvFAJrmn5Uc9O54QHqIfEu0jAI1tkZG1y1QZ6T8h4MPzZg1xYRCoVMEA3PrLakKq Zh15kZPltw54kGJjhHz4nuC5PFoytIAAtmPAKbQXTMxXIoXbdbsqTBnRuKuztXWUCq3q 8mn3ifcF+jfwWraucSnGFASnhMeprsMkjjz0A+MAj5WMJLSaZAIcn8/joEGwyj0ogHoQ QaxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=Spmp5Tk3iEtqE4TakLgDMzw0KFx8MfCsUhQrPLM9+cs=; b=eyl/tijHmMRafribOEgxnpA/nXJpmkNkp57CgGtE9cdPK4ILBo/or+v42c5/zb6QmX td7O1pIUvaQ74DsBtsPrtLtanpZsg07j+eLksH+0I57KXQ0putRdVv1r7nX5rkXZyg9e 3FPscPiHLGboOR/7HGS4p+ByVNkjgAPMxC9IlJCrNHNUCMg2KELqnL361tAjBxnR9SGo PVVFK22wDNXSJzrej52914Ru1ugfvd0+SebPHl7XPsKFNXCAOdHdDx8KdsJlkvGcfrXj p8iXKlM04UsQ5z13J3Txlv1WbP6re1CSKlF+PJoBgZ7wRyGU1afGIa+i6rpEJ+aUUpJq U+eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=P0DJOk6H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h2si7602158eja.259.2020.04.13.21.32.38; Mon, 13 Apr 2020 21:33:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=P0DJOk6H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728977AbgDMLZ3 (ORCPT + 99 others); Mon, 13 Apr 2020 07:25:29 -0400 Received: from outils.crapouillou.net ([89.234.176.41]:39716 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728964AbgDMLZ2 (ORCPT ); Mon, 13 Apr 2020 07:25:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1586777124; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Spmp5Tk3iEtqE4TakLgDMzw0KFx8MfCsUhQrPLM9+cs=; b=P0DJOk6HriC0s37BJhSot3nEJqW2fb8W7qlyZeMRoJn9JhXtfv0uEs5Tn61Mbt+dBuQauX nnfNSp8T0JGD24iqzKo3mE/rdZ4wROBre3Igkpw2HAnNSWbh0U739h7NFpReT1b/pbiAOU md7+/hp4ReBv+29kdl5L/2OK2h963Gw= Date: Mon, 13 Apr 2020 13:25:13 +0200 From: Paul Cercueil Subject: Re: DRM interaction problems on Ingenic CI20 / jz4780 with dw-hdmi and ingenic-drm To: "H. Nikolaus Schaller" Cc: Dave Airlie , Sascha Hauer , Andy Yan , Yakir Yang , Vladimir Zapolskiy , Paul Boddie , linux-mips@vger.kernel.org, Linux Kernel Mailing List , MIPS Creator CI20 Development Message-Id: <125Q8Q.9F49TXF6ZICX1@crapouillou.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nikolaus, Le sam. 11 avril 2020 =E0 16:14, H. Nikolaus Schaller=20 a =E9crit : > Hi, > we (Paul Boddie and me) are working to get HDMI functional on the > Ingenic CI20 board with jz4780 SoC which uses a specialization of > the dw-hdmi driver. >=20 >=20 > So far we have identified two issues. >=20 > The first is that HPD interrupts are not properly processed. >=20 > drm_helper_hpd_irq_event() is called by HPD events but > dev->mode_config.poll_enabled is false. >=20 > Therefore the interrupt is ignored and nothing happens. >=20 > Now I wonder about the logic behind checking for poll_enabled. > I understand that a driver can do either polling or irq or both. >=20 > Therefore handling the irq_event shouldn't be disabled by poll_enabled > being false. Otherwise we can only do: nothing, polling, polling+irq > but not irq alone. >=20 > The jz4780 hdmi subsystem (drm/bridge/dw-hdmi.c) uses >=20 > connector->polled =3D DRM_CONNECTOR_POLL_HPD; >=20 > but shouldn't this enable polling? Note that there seems to be > no (direct) call to drm_kms_helper_poll_init(). >=20 > If we set dev->mode_config.poll_enabled =3D true in > drm_helper_hpd_irq_event() things start to work. >=20 > Please can you clarify what would be best practise here to > get HPD event handling working. >=20 >=20 > The other issue is in dw-hdmi.c: >=20 > We found out that ingenic_drm_encoder_atomic_check() fails because >=20 > info->num_bus_formats =3D=3D 0 >=20 > and not 1. This blocks further initialization. >=20 > The reason seems to be that dw_hdmi_bridge_attach() does not call > drm_display_info_set_bus_formats() with a proper format like > other drivers (e.g. drm/bridge/ti-tfp410.c) are doing. >=20 > We have patched to set a single bus format MEDIA_BUS_FMT_RGB888_1X24 > and then DRM setup seems to work (although we still have no valid > HDMI signal but that is likely something else). >=20 > Please can you explain how setting the bus format should be fixed > in dw-hdmi.c. >=20 > If these questions should be forwarded to other specialists, please > do so. It should be sent to the DRI mailing list, you missed the most=20 important one. -Paul >=20 > BR and thanks, > Nikolaus Schaller