From patchwork Wed Sep 4 13:28:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11130265 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE7A213B1 for ; Wed, 4 Sep 2019 13:28:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C4F9622CF7 for ; Wed, 4 Sep 2019 13:28:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4F9622CF7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E4F489BD2; Wed, 4 Sep 2019 13:28:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6747F89BD2 for ; Wed, 4 Sep 2019 13:28:19 +0000 (UTC) Received: from pendragon.ideasonboard.com (mobile-access-bceeb5-228.dhcp.inet.fi [188.238.181.228]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 32D1A440; Wed, 4 Sep 2019 15:28:15 +0200 (CEST) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 0/2] drm/panel: Extend panels to report their types Date: Wed, 4 Sep 2019 16:28:02 +0300 Message-Id: <20190904132804.29680-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1567603697; bh=gWlivNWCcKa/Ceqs6r8DllGbpecPY9p5VH/Vg+Loptg=; h=From:To:Cc:Subject:Date:From; b=o7iqLvel5W3YPgl8FgSMlctiYyaKvTN54NCbcLey1rkYyKJUvadG7pzKQRUfvvFqT dhunXKFT/nj7AUIWKDv9DZS0v4PwFAOSIbvFELpYaR/z9inNEnMCBODiOjz1KgcrXW tZw5IPKBi9uqCksu6ewNA+Zs/QraM1P3HWAT9Jow= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thierry Reding , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hello, This series, whose previous version was named "[PATCH v2 0/4] drm/panel: Extend panels to report their types" and is available at https://www.spinics.net/lists/dri-devel/msg224579.html, allows panels to report their type, in order to create drm_connector instances with appropriate types in the upper layers. In patch 1/2 the drm_panel structure receives a new connector_type field to report its type, set through drm_panel_init(), and all connector drivers are updated accordingly. The panel-simple driver however only reports the LVDS connector type for known-to-be-LVDS panels, while all other leave the field initialised to 0, corresponding to DRM_MODE_CONNECTOR_Unknown. Panels supported by that driver will need to be reviewed one by one and their type updated. This was done to avoid reporting an incorrect type, allowing upper layers to catch DRM_MODE_CONNECTOR_Unknown and WARN() to trigger an update of the corresponding panel. Patch 2/2 then modifies drm_panel_bridge_add() and its devm_ counterpart to replace the connector type argument with the type reported by the panel. This can't unfortunately be forced upon all drivers as several of them hardcode a DRM_MODE_CONNECTOR_Unknown type, and would then change the connector type reported to userspace, leading to possible breakages. A new function, drm_panel_bridge_add_typed(), is added with the existing behaviour of drm_panel_bridge_add() to create a panel bridge with a forced connector type, and drivers are switched to using that function. They should then be switched back one by one to drm_panel_bridge_add() after careful review (and clever handling of the connector type change issue). The drm_panel_bridge_add_typed() function is marked as deprecated and should not be used in new code. During review of v2, the question of whether to introduce a new DRM_MODE_CONNECTOR_PANEL was raised. This is still being discussed, but such a change would still need to expose the existing panel types for backward compatibility, and this series wouldn't hinder this in any way. I thus believe that we should merge it sooner than later without waiting for the DRM_MODE_CONNECTOR_PANEL discussion to settle. The patches are available at git://linuxtv.org/pinchartl/media.git omapdrm/panels Laurent Pinchart (2): drm/panel: Add and fill drm_panel type field drm/bridge: panel: Infer connector type from panel by default .../gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 3 +- drivers/gpu/drm/bridge/cdns-dsi.c | 3 +- drivers/gpu/drm/bridge/lvds-encoder.c | 3 +- drivers/gpu/drm/bridge/panel.c | 69 ++++++++++++++++--- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 +- drivers/gpu/drm/drm_panel.c | 5 +- drivers/gpu/drm/ingenic/ingenic-drm.c | 4 +- drivers/gpu/drm/mcde/mcde_dsi.c | 4 +- drivers/gpu/drm/panel/panel-arm-versatile.c | 3 +- .../drm/panel/panel-feiyang-fy07024di26a30d.c | 3 +- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 3 +- drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 3 +- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 3 +- .../gpu/drm/panel/panel-jdi-lt070me05000.c | 3 +- .../drm/panel/panel-kingdisplay-kd097d04.c | 2 +- drivers/gpu/drm/panel/panel-lg-lb035q02.c | 3 +- drivers/gpu/drm/panel/panel-lg-lg4573.c | 3 +- drivers/gpu/drm/panel/panel-lvds.c | 3 +- drivers/gpu/drm/panel/panel-nec-nl8048hl11.c | 3 +- drivers/gpu/drm/panel/panel-novatek-nt39016.c | 3 +- .../drm/panel/panel-olimex-lcd-olinuxino.c | 3 +- .../gpu/drm/panel/panel-orisetech-otm8009a.c | 3 +- .../drm/panel/panel-osd-osd101t2587-53ts.c | 2 +- .../drm/panel/panel-panasonic-vvx10f034n00.c | 2 +- .../drm/panel/panel-raspberrypi-touchscreen.c | 3 +- drivers/gpu/drm/panel/panel-raydium-rm67191.c | 3 +- drivers/gpu/drm/panel/panel-raydium-rm68200.c | 3 +- .../drm/panel/panel-rocktech-jh057n00900.c | 3 +- drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 3 +- drivers/gpu/drm/panel/panel-samsung-ld9040.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 3 +- .../gpu/drm/panel/panel-samsung-s6e63j0x03.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 3 +- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 3 +- drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 3 +- .../gpu/drm/panel/panel-sharp-lq101r1sx01.c | 3 +- .../gpu/drm/panel/panel-sharp-ls037v7dw01.c | 3 +- .../gpu/drm/panel/panel-sharp-ls043t1le01.c | 2 +- drivers/gpu/drm/panel/panel-simple.c | 26 ++++++- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 3 +- .../gpu/drm/panel/panel-sitronix-st7789v.c | 3 +- drivers/gpu/drm/panel/panel-sony-acx565akm.c | 3 +- drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 3 +- drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 3 +- drivers/gpu/drm/panel/panel-tpo-tpg110.c | 3 +- drivers/gpu/drm/panel/panel-truly-nt35597.c | 3 +- drivers/gpu/drm/pl111/pl111_drv.c | 4 +- drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 4 +- drivers/gpu/drm/rockchip/rockchip_rgb.c | 3 +- drivers/gpu/drm/stm/ltdc.c | 4 +- drivers/gpu/drm/tilcdc/tilcdc_external.c | 4 +- drivers/gpu/drm/tve200/tve200_drv.c | 4 +- drivers/gpu/drm/vc4/vc4_dpi.c | 3 +- drivers/gpu/drm/vc4/vc4_dsi.c | 4 +- include/drm/drm_bridge.h | 11 +-- include/drm/drm_panel.h | 12 +++- 57 files changed, 205 insertions(+), 78 deletions(-)