From patchwork Sun Jun 2 12:04:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682794 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2359381B8 for ; Sun, 2 Jun 2024 12:04:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329891; cv=none; b=mg5Da3aOUTPM+4F/Ul1lXZpuKZdYV5iDJkhYHc9lr50FGIBNlh1NmFHYyrQ+zf/3Kx2tpA7rOLwND4SefTidqOTStGDxky2mFoUYwvso0kb9uzhthNkILUGqrEk3WUwrzdKaQU8j5LJ2of45YP7ku+PcxUk3oWR3k5jY+IrwbnE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329891; c=relaxed/simple; bh=SFNXn1zh/yUH5lKBoXzlQkp+p1CQ7cqY5rYlPQmKP7Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LLzJulEqva54uCTLYSbadSvnnBTZinUkKEolLrgB4TrYfQqo4H3ZPl+hg2crn46qqBR2iJFw2YN0M6cbKaG11lVlDpxceUVsc/gj4paUECecGAE8gjC2QACZdSmjZgZTGErUFCmciDFc1ZVxxGFwWfq/L9hC43Jy+dCDijPsB2k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=EcW6KNTl; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EcW6KNTl" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52b8e0e98adso2411028e87.0 for ; Sun, 02 Jun 2024 05:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329888; x=1717934688; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pQWdjTwgnIdZS6takOhMDQQy8XjSBnwUC2ksC3WzZco=; b=EcW6KNTlZPgqfAznHTkFu/kqXWcq4nz8oRAMDLDgC0l71tLOJpbhR/AcAtzaHnMPLQ d7a2vEec4dfS6EmkAZZ1St7ZW9AG+rGxZvHq+2rI2qnbDmnaYFwrEqCoq9ubytNrVEIe NGH8CYF/HRjDrG+b7XhnF2QdHajzvTN/4WJszTo+s2/T4cdYUT75FUVfHx0LgveG0kOI Uc0D1ifW+BFZtGF1sUiOMHJziWtMscKbu1LtcC7O/FR2sJjohZb4mn4CFxnnNlDGGJhK cQpFaCCVwqE+orEbucH7UPdv5yh1JodNQCUX2YSRt2m0TZ0gz9h7sQojj3BROZs6gZCW rnZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329888; x=1717934688; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pQWdjTwgnIdZS6takOhMDQQy8XjSBnwUC2ksC3WzZco=; b=fdc25PKFkjMOwXvYtgaBSoD3Jd3a+M9JzyvR/KYtYB2RQegEHalMe4W0rg5liKh0Ot wNsVwDJAnCZAmoRVoVKLvYo4AroqapQ/XJMsrj8dvwW2sIESFnmb4KSC71nVx/wznFX+ oVYJ+YiDsb3jOxxbgZAVPBq2e3saHDPyhEYwLsvXI1vrjFDHcic2cweMemAMC6Z1ddvy t7LuDSXI9OHVMkTuQQIE/fhFWSSFOdONpWMYh9KK7ci7qbsF45S5FY1hjRwvfnIjdGyP HSF/X1LjirYp6RQtJn+8DD+dSSUkwGvMcf7xs0ILfEKdwTy7oG8mkfHYW8vCvuTJWCqD G7kQ== X-Forwarded-Encrypted: i=1; AJvYcCXSecIh+6ZmMEJlq88WjK0SMCzfIN/M0808D903AWAWG20mOl284EHJArtCEbg3e5q3UCQJvu12EHl7AaZ5IhOnvrfP X-Gm-Message-State: AOJu0Yy2OXT+nW5769rfO79OLsBrk3Hb9y6zQPjQNdy9C+F8KExSd/d/ 3AA9YbU9gc2HlVybxDdgx62pgg8bqK39YE0QGYCJFUA3trq4Nyi+iQAmIt9wmeo= X-Google-Smtp-Source: AGHT+IGfozs4AwvcZe4Ex5alE8/DWJLLE0peGqkDlWeKv2/RBkKRrvdguJMijbWU1spsIZJp4mhVRw== X-Received: by 2002:ac2:4c86:0:b0:51f:696b:949a with SMTP id 2adb3069b0e04-52b896c7ae7mr4279067e87.48.1717329887841; Sun, 02 Jun 2024 05:04:47 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:47 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:41 +0300 Subject: [PATCH v3 01/12] dt-bindings: display: fsl-imx-drm: drop edid property support Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-1-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1524; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=SFNXn1zh/yUH5lKBoXzlQkp+p1CQ7cqY5rYlPQmKP7Y=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ1pM/J2vZz5Isk1dyi0v4TtXuFzuvoLEo4zOkvkbo396q dcI1ed2MhqzMDByMciKKbL4FLRMjdmUHPZhx9R6mEGsTCBTGLg4BWAiU1XZ/8rn3ldQjYy/vUz1 1W3lC1Uxdfwmr+15haMreA5z6us5d1/sl+cV/7F9nXztqmde39LbHA92W/Qtj45XWC+yqWq6cnm o6kz7LPszV7Zs+CexOdpE66wmb/XGx3kHI74KN8i9mXT1Q6KBwjwe7WePr7ulZ175o9++4pSA4/ XeGol1K6oq/Ccu+y+iqv//ntisVcpnG3LXJdpO+K5p6WibssF/v/r5d5xJhofe5laHLpvEbSs9/ cjR8tJ/P3kn64tv2c/IOPeMt+ExH+ZZneyquzqenwhae2POpquM56XPVp5n5eP+nqMczKm1UIFd ebftxBcS/UqXLzhWyVYne6S/jPXIdGhpeWhuFu1v9O8BAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A None of the in-kernel DT files ever used edid override with the fsl-imx-drm driver. In case the EDID needs to be specified manually, DRM core allows one to either override it via the debugfs or to load it via request_firmware by using DRM_LOAD_EDID_FIRMWARE. In all other cases EDID and/or modes are to be provided as a part of the panel driver. Drop the edid property from the fsl-imx-drm bindings. Acked-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt index 3c35338a2867..269b1ae2fca9 100644 --- a/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/display/imx/fsl-imx-drm.txt @@ -119,7 +119,6 @@ Optional properties: - interface-pix-fmt: How this display is connected to the display interface. Currently supported types: "rgb24", "rgb565", "bgr666" and "lvds666". -- edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel - port@[0-1]: Port nodes with endpoint definitions as defined in @@ -131,7 +130,6 @@ example: disp0 { compatible = "fsl,imx-parallel-display"; - edid = [edid-data]; interface-pix-fmt = "rgb24"; port@0 { From patchwork Sun Jun 2 12:04:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682795 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69580381BB for ; Sun, 2 Jun 2024 12:04:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329892; cv=none; b=UkA/X4pJOCifehrsWPsuAm886Sxd48auFQb7KG78xBbax68AchLMl0nFOUk16Iy6wCEKHa8UPnsIIRfadHERWp0oG6G8cAjojkwDkA6zIEBPfxhx+LACyoC+/JzQVVRyZPF4zbnREjQSdrNyYvddaIzOQ0lSm1pzWEu3B71Ctuw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329892; c=relaxed/simple; bh=3Nz5IHmPVWRwHFsw4a2c0uKZtmM9s7xJPi4nSL2SZJE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EMgeUDRCpw9R7Ld6jTu7zCS9w/hnAXKZ+8SjiZFnuyzkSmcNQ9bIkC3vPxjw6GuNi3PnQtGAvFuyoMV4lRQAyL9AREE2DnEZG3QbnnM/CHihhuwxst2XJ3f6KlcVVjY5FzIEf3xB7RndupBww383o3Hvivc0QPovY2KcjNz5JOE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=H9cBA4M8; arc=none smtp.client-ip=209.85.167.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="H9cBA4M8" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-52b88335dd7so2857204e87.1 for ; Sun, 02 Jun 2024 05:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329888; x=1717934688; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=BGWVh/Zr3LGFqNC/PDJ+t+m+rq2p7BOWG0ebyvpQons=; b=H9cBA4M8RWbPL+hA+QmdN6GtXlmRd0jREoX2FtL7yFLMUngME8vMEnvGx4omelHeak 2AtADaTOHVptd6sqrPNcEqCllT4yKS/3imYz0/CeJQVZ+1KSnk6bsQfcGgRsiqNFhp/w MKHKZ3OiGPFSFAoQoOl0Hz7Cmop+Zy8t+td6w8/3dqeLGcZHMfpVZ13B99KPo9D1tia5 KeZFt8sDQCg7CtmXreDpfYSs0qKVbI2yHHkrUGsYhXKIwjwJjoIs97txzYV/1Stkz+0N beWdM7T0fRPOMn3U6FtHRFflAaRmtAToWw7Jww5nlcZY9xt13zGjgZazBBWKYcV1Vw8H MawA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329888; x=1717934688; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BGWVh/Zr3LGFqNC/PDJ+t+m+rq2p7BOWG0ebyvpQons=; b=KSOBFtBbhEj8MsvvrnnYo1aD5kd+6fEb5nBJFmHj+z9hjUBATCUoqWPLuC1X/kPCQP 8IAv6qON3Rfq73MzoI/bWpacybU1/6jem3zmU3PyaoP7nZhEQAi4TGvpqFhgPd8acP+v Fhl7/WaGVfbqMx5DYT1C92sMMJhy5mdfnpg0XNSlzs/9oA3q7pZiIb9edun3jvc/+P5M Y9Oot0zmtVEdq5b86SUTEjk1pNKRqpc0263Qp2DQdFjAU0vzA3vxdKa55Whcqz6KUIUz 0TbgJ5XCPsnX0DgtGw1DrqgyMLTgePZI1MGzrtaVyPvV7jsrGp/nU8TzNm+M1JYOv0c3 cc5Q== X-Forwarded-Encrypted: i=1; AJvYcCU9uh6DKSZGB6Af8RD6QKFGDpbxTDh3VIgm6LosY3m6PphDSq40s3Y6PiU/BUBJ37Ezl4g8n4SIGDgZXJbkY/O4ASne X-Gm-Message-State: AOJu0YzmtJNEmLChBI4VkdKI3pL1C12b5jbwuWRP9WlTqXOy+IlOerNX 2yLOB+LoKQS9ulVkC9MqNS0VfF9ZZSZegvVgLDjtc+EsKCuMlu0G3rGVIwepZK4= X-Google-Smtp-Source: AGHT+IFioojHdR8Li3FtAUmWNxJNZSvKgoMY/dETwt1uCPkRs8JMSzzF/VAu/d9Aejv8BYFZwW5OPw== X-Received: by 2002:ac2:4e94:0:b0:52b:7f00:5695 with SMTP id 2adb3069b0e04-52b896d26a1mr3567965e87.59.1717329888558; Sun, 02 Jun 2024 05:04:48 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:48 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:42 +0300 Subject: [PATCH v3 02/12] dt-bindings: display: imx/ldb: drop ddc-i2c-bus property Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-2-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1144; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=3Nz5IHmPVWRwHFsw4a2c0uKZtmM9s7xJPi4nSL2SZJE=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/cS9DynlRGL/q+FhwSBFBcGFVl4UCT9geOY UOhOg3+BfuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3AAKCRCLPIo+Aiko 1dStB/9ur7o0ZT1BGSJZP85LBwNFyha0XzFbawRG0NkoKwEt/qs9Ss23XuP64+H0Cgyv/lVZjih EIYQvrftDLxdSueWB7OoHv+r853IRqJFX5s/L3FwrhUoWR4NxzSmt+dwf5i/uyMTsq00ulQE5cn bZEqh0UlBGShgZQEb8KmODQEGST0F5Y1hIct+TfuXs13DQYdkp02ie1uKCpXSeBRPqWG27zz+K4 +1/03y1P7Nh61Dh/a0EX9L9v4YVhfWy/URMe2TNrE2Lt9GPP9AZjKCGZc6sPeAnsig6dVr6e1bd LvZnaiOQHvUe+FMP8pELJ2COAaNjL9n+YQrHqNflOdiRBK+b X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The in-kernel DT files do not use ddc-i2c-bus property with the iMX LVDS Display Bridge. If in future a need arises to support such usecase, the panel-simple should be used, which is able to handle the DDC bus. Acked-by: Rob Herring Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/imx/ldb.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/imx/ldb.txt b/Documentation/devicetree/bindings/display/imx/ldb.txt index 8e6e7d797943..03653a291b54 100644 --- a/Documentation/devicetree/bindings/display/imx/ldb.txt +++ b/Documentation/devicetree/bindings/display/imx/ldb.txt @@ -62,7 +62,6 @@ Required properties: display-timings are used instead. Optional properties (required if display-timings are used): - - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing - display-timings : A node that describes the display timings as defined in Documentation/devicetree/bindings/display/panel/display-timing.txt. - fsl,data-mapping : should be "spwg" or "jeida" From patchwork Sun Jun 2 12:04:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682796 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3917438DF2 for ; Sun, 2 Jun 2024 12:04:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329892; cv=none; b=sTuU7U2kgKNk4BqnE21XqnIWi3X7rzUQWahAuKCwNLPSBKVi1iGuRatXIVERvX5TJkNm4mswOjsMbgYcPvZ5Kq2Pjchx/wbKDjWb503uxk9ulSMcBGDN/4Q56YOAXk9C49HDvDOPt4dlYYL5DJ3o5y46czzQC2jMhBEMitYjoIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329892; c=relaxed/simple; bh=ZDw9je94QoyosO0168STtseYxQQ179pVpV6GiETvE+4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fBeLfw0N4N394wmnN/5wH/U0ABN+/adfiavM43VOIs7ZRlKL+QVdsTpw+FCbYzpY1gaAwUFfPAcSriFAVjrMpq+QuX4I9S+KEym1+gqCSamvL1oL6n3WLVgSuoN2xdqh3YaesEdZjg+YK5EesMEP3XsJKr77TYL+slzhh8B0DK4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=dU1aIAho; arc=none smtp.client-ip=209.85.167.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dU1aIAho" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-52b91f655d1so850649e87.1 for ; Sun, 02 Jun 2024 05:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329889; x=1717934689; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=nxc4vHH87Y1eSO87AR835I7/5WLCpgJXyFLj/BGpZY0=; b=dU1aIAhoGas7tXmL+cl/SFrfe+5InvKhG2ylqoQ+X20W9IcEo12sMB/LFcF7TRmGId iudN3ikmrw2buJBrNqzKXQfbYQJNXsmjc3qSD3eUKJOnZpMbnvCmkWmuyZ5nl7TX56GW of+0zKRP26unAac3KYeLzNRRjupCor6bdW5g/MwJgplkS8uKbiEUm54MxVe9IJuI355t 7jzzxJhrvSzs/pBbDWL348eizENt4C8VeCoGzGo/uZSIYfjmy/1LlxJNu9XYTttl+ao2 6zjsXeZ8plidK9nr8+Pv6/SkBNQwCz9qtod3xUAc3VjtMImjShhoPrXeOxyAddThccZ7 oH5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329889; x=1717934689; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nxc4vHH87Y1eSO87AR835I7/5WLCpgJXyFLj/BGpZY0=; b=mFRrrM8MXE05ARytVrjGwg/jJwNj/z7Z2ldDw9c94ZQv8JOp2WUvpodyU/aL/Ah2dN 34tetk7+6ohpy8Z7nnjK0tzNpaxG7ZBLx+yZdvjRmCjcgPjuiCChyz7NXnwzxylLi/Ak gsZu+cZqR4i0RsZJccRjEKKrB3qzHhcBZSuNWZYm9JzY54q8odoOZZ0SuNG0FPyQm4GI QU9y9STyPiWr2G5GZCCi41AYuXdXEneJ+RMDu1QCotC+LyEwPXzqCJb0IxAxaLdlPE3x BWLpcWemdOqF4fayyAsrVV+S29uAjExqIpfsGFssWumRBEsBxet9YBwPHtJVFelRApHs 3aSg== X-Forwarded-Encrypted: i=1; AJvYcCW/pVuqfN8Emv4RpdKEZSKRX2L1k9+rZPN1/vJS3EdxHZd2TW8K3yjRjfGkqnyMXTBHw2e3+k1ldWczZdBHiKOpxzH6 X-Gm-Message-State: AOJu0Ywu5zKNdBIg8c7krGVDLptpwu4zQGaXFq16hA6gT+r7RPqqmpOk ehqMTr6I39cryOK96s6Hn1oXriWZyToLWarE8mBjx6w65d8gWMSlRRieLdwi/j8= X-Google-Smtp-Source: AGHT+IFPOiv0yb9NenXs61eeyl+FTzUia9VO7YGHEV3B4cyF+m7yIyCA+pulo20IEMCgPXGBKi/V/A== X-Received: by 2002:a05:6512:3d20:b0:52b:963d:277c with SMTP id 2adb3069b0e04-52b963d2864mr477027e87.33.1717329889449; Sun, 02 Jun 2024 05:04:49 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:48 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:43 +0300 Subject: [PATCH v3 03/12] drm/imx: cleanup the imx-drm header Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-3-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1410; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ZDw9je94QoyosO0168STtseYxQQ179pVpV6GiETvE+4=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/c9m9P02PzAYv+Hvngg0pK/UDBTwhhmG1zr 6YIzCrb9vGJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3AAKCRCLPIo+Aiko 1fjzCACVJAOnM38OBMjesvSYWvhCttUEqRnqa1cwq4nlLesJDTMZ2OUTNhRtlYVXOyjfQdPCZoY sFg6k3yFt2WWYJBGVbYAc3fuchDTgb0HEb98vxj41NM9rI7BNJSWHJlLr6XS7RGIK7LtSQ9vpcj ESAFP3iCtlpbs+a0als6qX4eWKJZOLwj8uq1Lt4aQSHCSo9e4RyTzhFKMcp9PsbQWyhhWQLek1u ABZyZLlg4UbyRcy0FlQAFgPnpEw6Y5h4FovYheyJU3SjH1hxE5Ve5sHgaXMJ8/nqFD0scxw+dML s3IqxYlKtclaMDhG8+vC5UlutqEjdAQVKc/YRM0Y6WMrzg/l X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Drop unused defines and obsolete prototypes from the imx-drm.h header. Reviewed-by: Philipp Zabel Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/imx-drm.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-drm.h b/drivers/gpu/drm/imx/ipuv3/imx-drm.h index e721bebda2bd..e01f026047de 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-drm.h +++ b/drivers/gpu/drm/imx/ipuv3/imx-drm.h @@ -3,14 +3,9 @@ #define _IMX_DRM_H_ struct device_node; -struct drm_crtc; struct drm_connector; struct drm_device; -struct drm_display_mode; struct drm_encoder; -struct drm_framebuffer; -struct drm_plane; -struct platform_device; struct imx_crtc_state { struct drm_crtc_state base; @@ -24,16 +19,9 @@ static inline struct imx_crtc_state *to_imx_crtc_state(struct drm_crtc_state *s) { return container_of(s, struct imx_crtc_state, base); } -int imx_drm_init_drm(struct platform_device *pdev, - int preferred_bpp); -int imx_drm_exit_drm(void); extern struct platform_driver ipu_drm_driver; -void imx_drm_mode_config_init(struct drm_device *drm); - -struct drm_gem_dma_object *imx_drm_fb_get_obj(struct drm_framebuffer *fb); - int imx_drm_encoder_parse_of(struct drm_device *drm, struct drm_encoder *encoder, struct device_node *np); From patchwork Sun Jun 2 12:04:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682797 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1991C39AEB for ; Sun, 2 Jun 2024 12:04:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329893; cv=none; b=LzL78HtRlEgBH/RzawP+lRGXoomcUBbRK2OxHSirkwWPwiyObFcu41zxiWDwd1RbheH3+YYMEkCOcHu6Ik6foib8CRt+vG+RnDp69rsK9ra/UvruQwMyHnOM8B1k8d468409PkTXgqVEuGmXdIbkBp/xSHTSl96ueUGoVvzvdsc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329893; c=relaxed/simple; bh=p3R84UdnZzJNiooJHROp8P8TIKNW8VASKGnwF+31z+M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AjVgw6tM7t66uge6PNkVg1EHm0Hy8xZu6EJYdMrlATEONIpO66B4UZ6suI7TDzHCyAaHkkMy2ppPHImz6m66yJXlmPKBOQYh6RIhMaC+FwTyVMPj9Fn53v6qVsbtSNwCwy17Avp0uJt05EhTlEMIDQh2ItKlbnFjMd4shaNzueM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=fTHJZHYp; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fTHJZHYp" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-52b89fcdcc7so2736488e87.3 for ; Sun, 02 Jun 2024 05:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329890; x=1717934690; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qCmMEV20sJhl6q9JP4BtOvE1ThwKifoA/eb2lcmOX/k=; b=fTHJZHYpJnOy460Izb+GAqqgVUpo7drAnPtQRVhsGpaNOK6URmzczGufx6wmlzHH5s QM4o89wmzrpSpexWdiTLmcs9ZzPZtcwORu+f1swktOi2HDrfj9T2/F/+lKqK2qZgw4EV wK/0s1AVQlu0HR2D0lo2ZF9Tcu/0Z304AkQExu3Nl3+VWyzPFbh6onLBvebm1zmyOcAr 0OlJJ3dri1MmBOUvLsr4sJ0try5jt4fmlmfx6tWJJ3ELzeKxEI1tDICLo+qlHr+LV24W dnkN22w8Eumeza43ktiieUYzHR1F6jEZa+UdlSNjRt3PhTrrBcrrkrU4v//zLMWdnlOS abpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329890; x=1717934690; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qCmMEV20sJhl6q9JP4BtOvE1ThwKifoA/eb2lcmOX/k=; b=oBW6P95gH5F9MsogwXV6s713HyFlClZk7OKs7F5VxwvzdGKgjks0pwKlIsJdMk0cAh WJHKFnHp2lyCQ8ZtcP86p7WLDp+kPC6phyHovn+pJEHtz6njSRId+0fXfo2Zv6t1cm45 +2xzsDKXVqG7ru27ysOXQjoNDMt63ThfF+iUdznhdkW1RxyJTxbbZ1kXA+6UoLotabTn oS2yw0gcm/+MTNb4hHm4c0LbtNK8uLBTipgB4vz73LzaL8p3bjEN/+pRuuHWaVoLKUKp EKmBwXCplgh1njP5oamPBGHxMiuoXhcoGP4AwR7r6FyXWghsWO8C+hKov8nglYPFHKWr EF3w== X-Forwarded-Encrypted: i=1; AJvYcCVIZQQokNZvV10eS13sv7AXJuNVTBHGkKfSxLdIUBmu+Ur0cIHNEtDmfyYLmsV6yleVkrCokuxi71xQ97enUCejFJIl X-Gm-Message-State: AOJu0YzEccGI1qeQegxipISvjB+5n0LefYp989kS0TCugCIJqJfU7nQV MZFdU3BW2i9EGIzeDYfJp54LftbLj1pTNHuD5Tc+Ehjuieqje+ziGEBpi9mMu+g= X-Google-Smtp-Source: AGHT+IGCiCd1TG61yPuHP2aBTp9MSL5cxIMjf2EW/NA9zU4V8f7CT49VmAhc+8/OK+n9wpRK9ETuPg== X-Received: by 2002:ac2:58ed:0:b0:51c:c1a3:a4f9 with SMTP id 2adb3069b0e04-52b896d8790mr3599090e87.64.1717329890158; Sun, 02 Jun 2024 05:04:50 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:49 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:44 +0300 Subject: [PATCH v3 04/12] drm/imx: parallel-display: drop edid override support Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-4-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2329; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=p3R84UdnZzJNiooJHROp8P8TIKNW8VASKGnwF+31z+M=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/cNOEQ83ng70X09QmeKaF0NL8z0h92yMj9M 305afztkWaJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3AAKCRCLPIo+Aiko 1XexCACDSDdz/1zzBjj/fpPm9P74sgM1RPvq3rFuMSGAAgAMTldnUNhsH2r3LcogCivWWmXLeQF FqDenyVNvckt6NZDDg6cToyVSWnoY0/ZPbdNrI7al6UeND2y/snsiBo+L3ozuiDfoDdPm9ntfyI kBjy+bvMhGTmH9M5MvVwx9D5yk3XRVD6h2WP7dYTK0WpupSnRdq1EMF9Tl4jmYZY5LxwM41oc0h xvy5dVsY3tkCZI0dutTeNAPMJ5H4I6LVRLSiqOob7HGMrppHtwBbxjKtIro4Lqr1zr3Co29GKT4 Kx6xBvRoI1UOucJZYh4Ditfs6oa2OpLJk1rEb2MW/QQnLOZQ X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A None of the in-kernel DT files ever used edid override with the fsl-imx-drm driver. In case the EDID needs to be specified manually, DRM core allows one to either override it via the debugfs or to load it via request_firmware by using DRM_LOAD_EDID_FIRMWARE. In all other cases EDID and/or modes are to be provided as a part of the panel driver. Drop support for the edid property. Reviewed-by: Philipp Zabel Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/parallel-display.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/parallel-display.c b/drivers/gpu/drm/imx/ipuv3/parallel-display.c index 55dedd73f528..4d17fb96e77c 100644 --- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c +++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -34,7 +33,6 @@ struct imx_parallel_display_encoder { struct imx_parallel_display { struct device *dev; - void *edid; u32 bus_format; u32 bus_flags; struct drm_display_mode mode; @@ -62,11 +60,6 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) if (num_modes > 0) return num_modes; - if (imxpd->edid) { - drm_connector_update_edid_property(connector, imxpd->edid); - num_modes = drm_add_edid_modes(connector, imxpd->edid); - } - if (np) { struct drm_display_mode *mode = drm_mode_create(connector->dev); int ret; @@ -312,9 +305,7 @@ static int imx_pd_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - const u8 *edidp; struct imx_parallel_display *imxpd; - int edid_len; int ret; u32 bus_format = 0; const char *fmt; @@ -329,10 +320,6 @@ static int imx_pd_probe(struct platform_device *pdev) if (ret && ret != -ENODEV) return ret; - edidp = of_get_property(np, "edid", &edid_len); - if (edidp) - imxpd->edid = devm_kmemdup(dev, edidp, edid_len, GFP_KERNEL); - ret = of_property_read_string(np, "interface-pix-fmt", &fmt); if (!ret) { if (!strcmp(fmt, "rgb24")) From patchwork Sun Jun 2 12:04:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682798 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97E9C39FD8 for ; Sun, 2 Jun 2024 12:04:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329894; cv=none; b=dRWccPF8zhKp6dxJSLZtK0MgFOb40xafP8JlGteJTP+T+lXJWOcn6fxVUpGulSMXyM17ubspYHkF9073RBv9lqgr16d8+ZB+uG5AL3bvgpczqMCKgWPeokTPTLGGKby8XrWRln3HVrs50RFM2+6RacSGUq5wzKpSKlKyXYP3+0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329894; c=relaxed/simple; bh=l7M3G39iu9nNrCk8sJLPBZk54Nd8nGO4KLe4Ou6kT5o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Kx8WrGjJj+NGrs8AHAlsN0pxwfMCZCE5rL1peIlgfFHkC3V/O3dy2Vz4JQk0+/R73H2VJAq5pivXgp5SgackkbrMp2IE71MWouK0d8Y0yATc9QzJ22cIFqya0x6wZ2BIIexV7SqwwBPD/HS5G0IcgqD5ZUXLwdMYApZV0BRvQPY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=rhoUvnHg; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rhoUvnHg" Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2eaa80cb4d3so8720961fa.1 for ; Sun, 02 Jun 2024 05:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329891; x=1717934691; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ahx0B7IRhOU2KryLmin5A3x+RBjSRe40YtgpLFgn8h8=; b=rhoUvnHgU/x9XPnZplbRyzSPVswJ2vYzMa03Vi5W/9u8CJknVLYQ2OyAKvaveC3TTR aJCFRluSNvYXHb+Pw3xOz02RAgv6oI3/xuDaGH9OyNENsgNuF7SWahJpV5cuLMT3ECzd GtEZsFebPp4KGJ+0NVYj4IVOam1z8bXnyxXod5o7/DLe6Z3GZF5K8Nu8QlfIVEX9YCfI aXtx1oftXqRF1PpdHFCM43vkzCgYiPnesrMr8orrjoPA9S2xT1RpycB1EfJ5uHpLtMDg f+kRyVlFJ6lvN9L7BTymJoOFSRVdcQM4ZUHol89hjsfPoUKJT4an9S0d+Ji3DbP7K0sz 2v8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329891; x=1717934691; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ahx0B7IRhOU2KryLmin5A3x+RBjSRe40YtgpLFgn8h8=; b=bLC7HG5IvgoXUpTFqt3Ed8nums2i1lY5/Z5kQoEnZ5uWRcMMH3CinoLwxctNwa3IMt OGeWpEVY+wLgbIhv+bFtSktcbZRkQtTNHUvO/A4xn+AEQ59QxFMeScOzxiccGvml1CY2 qWkxkm5ZUoZHyvzRG5EFoG3mndiRz8x5+QLEpSw4J5sfniPTRJPQBaFwo8RX0FNSGwf1 shbYGbD0jdaBEo8O5UL8lk9HSEmChFzSuj+nzZNhkDwlnmB7nxlO4pvFkhCxUTeZqxPw Q5fOND/Is3vGa61VBm275RA1/8fp/M3Mv6p4Mi1EKsOe5UToJY3JeUvL7/rcEIkCdUks 3iqg== X-Forwarded-Encrypted: i=1; AJvYcCUm9jhIJK8d1b8aNNeJahSArMKcWlPhCYTSmETb3prdkVepwZJRklwaTSJ9TNMRuP+KuAf9tIg4EEE2QCy2AUJIFPHz X-Gm-Message-State: AOJu0YyVrIP75U3LzEbdD5+9DOpAvlDWCrza0HjduxO/ng+dG2PIEYvJ ptwYmjtg9QJlj+/LrBTwCgRFSLYu/eEibQwlKsPZ/wpeQb32JzXDMr1yiVI847I= X-Google-Smtp-Source: AGHT+IE9DlkDZJ/q6anZcEZCR4WzqVIVNYRa7q0Ns7NW+snWcKddBdYHt8pvqycOhI6UxRrnqrZ28A== X-Received: by 2002:a19:f603:0:b0:52a:e7c7:4ce6 with SMTP id 2adb3069b0e04-52b895633dbmr5188478e87.39.1717329890815; Sun, 02 Jun 2024 05:04:50 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:50 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:45 +0300 Subject: [PATCH v3 05/12] drm/imx: ldb: drop custom EDID support Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-5-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2531; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=l7M3G39iu9nNrCk8sJLPBZk54Nd8nGO4KLe4Ou6kT5o=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/dci5cApIh4CbjmDaF29E9SsPPCAy9IC1BP ookreVYSv6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3QAKCRCLPIo+Aiko 1cwKB/4xCsYHUgD+LgO7CvPxVhR6dSFIH9rYipIXrsQtH3yVtnXKxqJVgzCEVAa05JbbXYH4ozm RGrPvgpfVs5QGXj/4+MKxODCFxUFgqKcXQVdlh7exxMGFAAXoc1FMl7K7Kscd59HZM9ALmd95jO nkRvO0T+JiSJhIy4mucD6HAXICDqQ9iH64hAwCiC+og87UzNN4W4uWK+Qn5WpFYsn9h9eCL0GR5 8Aa0ZHfyxbhjEw4Tpo5oN3TLUtg/FfUdILUEkXtOi4Dzy8tLxkjc7eP84g4JYJrwZytzOUmXqlo cj1OsANGFG1AJ4XbaaYw73OVV6ibGtMWOB3FKoFa7K2w3JKK X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Bindings for the imx-ldb never allowed specifying the EDID in DT. None of the existing DT files use it. Drop it now in favour of using debugfs overrides or the drm.edid_firmware support. Reviewed-by: Philipp Zabel Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 793dfb1a3ed0..1924d8921c62 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -72,7 +72,6 @@ struct imx_ldb_channel { struct device_node *child; struct i2c_adapter *ddc; int chno; - const struct drm_edid *drm_edid; struct drm_display_mode mode; int mode_valid; u32 bus_format; @@ -142,14 +141,17 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) if (num_modes > 0) return num_modes; - if (!imx_ldb_ch->drm_edid && imx_ldb_ch->ddc) { - imx_ldb_ch->drm_edid = drm_edid_read_ddc(connector, - imx_ldb_ch->ddc); - drm_edid_connector_update(connector, imx_ldb_ch->drm_edid); - } + if (imx_ldb_ch->ddc) { + const struct drm_edid *edid = drm_edid_read_ddc(connector, + imx_ldb_ch->ddc); - if (imx_ldb_ch->drm_edid) - num_modes = drm_edid_connector_add_modes(connector); + if (edid) { + drm_edid_connector_update(connector, edid); + drm_edid_free(edid); + + return drm_edid_connector_add_modes(connector); + } + } if (imx_ldb_ch->mode_valid) { struct drm_display_mode *mode; @@ -566,18 +568,10 @@ static int imx_ldb_panel_ddc(struct device *dev, } if (!channel->ddc) { - const void *edidp; - int edid_len; - /* if no DDC available, fallback to hardcoded EDID */ dev_dbg(dev, "no ddc available\n"); - edidp = of_get_property(child, "edid", &edid_len); - if (edidp) { - channel->drm_edid = drm_edid_alloc(edidp, edid_len); - if (!channel->drm_edid) - return -ENOMEM; - } else if (!channel->panel) { + if (!channel->panel) { /* fallback to display-timings node */ ret = of_get_drm_display_mode(child, &channel->mode, @@ -744,7 +738,6 @@ static void imx_ldb_remove(struct platform_device *pdev) for (i = 0; i < 2; i++) { struct imx_ldb_channel *channel = &imx_ldb->channel[i]; - drm_edid_free(channel->drm_edid); i2c_put_adapter(channel->ddc); } From patchwork Sun Jun 2 12:04:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682799 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 791C71E52C for ; Sun, 2 Jun 2024 12:04:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329895; cv=none; b=NBAj5hxSHbABF/4nZi5klbDVkNRlB+WGT35NTO2Fc1M80j8dIjvrtx4qzjmFlwgClm9M2dtxsxdPIGzWaV0COohPWmixgIk1t34WEgLJyaNtq1nZl78Jy3p/7O5ra0/SdUaZ+owePjQsAKD3YkIU2KyKjm3uvPCaYkKcRe+45PA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329895; c=relaxed/simple; bh=OpWhxY1X8SkMml69I2Dn6lgdN1AEsg7Y8hzUgxz6Gx0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Dex2jRGb5Qu2B/V6hfcG5A9jq8dIm3DwSJr08up2Hea4l8OzqI7E6Z1Z6MnwqhQ+1fulNFl2pLEf6ZFQrGMAC//WwBeuCa45a16rfs1z+JGwV9b8y2kpSNv8u2FfsfSaDt4SDWat7aEPf42PtycH1com8C2kShAGlx2lC36+IqQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ffN6NMYy; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ffN6NMYy" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2eaa80cb573so7536261fa.1 for ; Sun, 02 Jun 2024 05:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329891; x=1717934691; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=h3z71OOWoNWZE+/hRN9KTPkL2PegZfYXg/orVwPR8kc=; b=ffN6NMYyH7mh7Ftx6ljIxw/WN4F9UTsfpMrPolz9W5hHZrYzDZ5wJnnJ3+cUeHcu07 MwP5PpAmFECpNvlUv/Aw0XA46Fj+y2petg0+QkENOS+3ZA7x6K9/7e9zMgY1lBjWSO8T tIb3OyhjHspEH+RvzxMaDBisHIurTBQugOhXEzIZIYWKsOEdIXl0xA4NiPP8Bvx74lBW ma4GaYCVO0MI9oWVLEwfvh9vEOP/1xPbT9EorCeNbj7QzgyFLUp4M3Y0YS4rmsam9LrD JpDWW30y5o3vchceFMTRBU0UYUcJKjc4igsLLiDXQo0rbLmQ8xpat2KR6Gjjch3i5K93 S6IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329891; x=1717934691; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h3z71OOWoNWZE+/hRN9KTPkL2PegZfYXg/orVwPR8kc=; b=lNGm6v4rrcUICFIx8edVkFx7jmW8+TPuWfhRVYg7m2Hc8hiNhVUfHHBzC6d6Qhpmqg pf32q3GqN6e1aZqNRelesOhR4u6D14cHSL8kE2ViPb6qMuPKv4r0mtPM2xXkwY7OMg8S cxdwShkZIH1YTltpX37iDGqg9+ispHwTz0rPEjxXOj/R25mk1MbJw3CPm1vEpAdGSRIN zdkuGwtMknhSYVkZdnl+xqC/S77gMPWs3u5ZqvafzgPZbtzILkVt6BtQBlVhdQD3B9a+ D7cPp/0LkgTE3rFGEwRCQEAehkc5ElP3sIbXSmfYVdVxtNgP2+M04JL1rLMxhk9A3uo3 phbA== X-Forwarded-Encrypted: i=1; AJvYcCVHlBKW2pPsMX0LJmzrrAxadqJwcfjdOj6tsNCv2waYAc7ObtXSswV94L6QN3cyaVWPDvngpAiRcq403Bt5HTn7S8Ts X-Gm-Message-State: AOJu0YzZOxCLjW4wvHnGFvyz1s95KBLhO/bjwdret8HuTbLcH9Rzq2P7 0y7TIEhxGaWLbWOYYp+WRmPSlVQihV5CVA+JNZy8fbjA1Szfr5rw2W2Mp9Aghic= X-Google-Smtp-Source: AGHT+IEU1T1JPwAyrMO5IbBAXktjwF9BMNKR9KPMqWrnmSSf9vVuZkPir8wiF0D+duaCctX822ai1w== X-Received: by 2002:a05:6512:b24:b0:523:8cd3:42cb with SMTP id 2adb3069b0e04-52b8957ff7cmr4204463e87.7.1717329891515; Sun, 02 Jun 2024 05:04:51 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:51 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:46 +0300 Subject: [PATCH v3 06/12] drm/imx: ldb: drop custom DDC bus support Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-6-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4225; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=OpWhxY1X8SkMml69I2Dn6lgdN1AEsg7Y8hzUgxz6Gx0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/dvzraZ7ctB4FChev2m27M7qCFXal54iU0h YugcsfUMBiJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3QAKCRCLPIo+Aiko 1dQHCACQB3JwnhGjzPIYoevRPyg+W/8rjb+b4FiGCX+8kr4tglyyDGDSnXk3TUYYOIH6n2zC0RH LkkwktFI2o9qKaRhqVxLe27I7goSpmnC0mPwKCoOFj5OumAxioG+Yr/QDUsuwsmw3h+NMODYwEo gmIxHDx3DQ4M9HKdiMgLzoAyK5qOluYntgRSjeFQnYW0ailrYrcufrco7bdLl67alAiN6AcvNJ7 FH0eg2FEpb6RdAavpMCIYXfAZHZ0Ti6Y2ssjWXo4cjxcXsFg9Oo5IV1O1QLU8AE+DWuX+LkrtWi 7eO+NGUo1rAm68FAuK5z66cLuVS1LQTHEFw8cuoOfgtEKfAz X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A None of the boards ever supported by the upstream kernel used the custom DDC bus support with the LDB connector. If a need arises to do so, one should use panel-simple and its DDC bus code. Drop ddc-i2c-bus support from the imx-ldb driver. Reviewed-by: Philipp Zabel Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 73 +++++-------------------------------- 1 file changed, 10 insertions(+), 63 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 1924d8921c62..3f669604377e 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -70,7 +69,6 @@ struct imx_ldb_channel { struct drm_bridge *bridge; struct device_node *child; - struct i2c_adapter *ddc; int chno; struct drm_display_mode mode; int mode_valid; @@ -141,18 +139,6 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) if (num_modes > 0) return num_modes; - if (imx_ldb_ch->ddc) { - const struct drm_edid *edid = drm_edid_read_ddc(connector, - imx_ldb_ch->ddc); - - if (edid) { - drm_edid_connector_update(connector, edid); - drm_edid_free(edid); - - return drm_edid_connector_add_modes(connector); - } - } - if (imx_ldb_ch->mode_valid) { struct drm_display_mode *mode; @@ -481,10 +467,9 @@ static int imx_ldb_register(struct drm_device *drm, */ drm_connector_helper_add(connector, &imx_ldb_connector_helper_funcs); - drm_connector_init_with_ddc(drm, connector, - &imx_ldb_connector_funcs, - DRM_MODE_CONNECTOR_LVDS, - imx_ldb_ch->ddc); + drm_connector_init(drm, connector, + &imx_ldb_connector_funcs, + DRM_MODE_CONNECTOR_LVDS); drm_connector_attach_encoder(connector, encoder); } @@ -551,39 +536,6 @@ static const struct of_device_id imx_ldb_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, imx_ldb_dt_ids); -static int imx_ldb_panel_ddc(struct device *dev, - struct imx_ldb_channel *channel, struct device_node *child) -{ - struct device_node *ddc_node; - int ret; - - ddc_node = of_parse_phandle(child, "ddc-i2c-bus", 0); - if (ddc_node) { - channel->ddc = of_find_i2c_adapter_by_node(ddc_node); - of_node_put(ddc_node); - if (!channel->ddc) { - dev_warn(dev, "failed to get ddc i2c adapter\n"); - return -EPROBE_DEFER; - } - } - - if (!channel->ddc) { - /* if no DDC available, fallback to hardcoded EDID */ - dev_dbg(dev, "no ddc available\n"); - - if (!channel->panel) { - /* fallback to display-timings node */ - ret = of_get_drm_display_mode(child, - &channel->mode, - &channel->bus_flags, - OF_USE_NATIVE_MODE); - if (!ret) - channel->mode_valid = 1; - } - } - return 0; -} - static int imx_ldb_bind(struct device *dev, struct device *master, void *data) { struct drm_device *drm = data; @@ -694,11 +646,15 @@ static int imx_ldb_probe(struct platform_device *pdev) if (ret && ret != -ENODEV) goto free_child; - /* panel ddc only if there is no bridge */ - if (!channel->bridge) { - ret = imx_ldb_panel_ddc(dev, channel, child); + if (!channel->bridge && !channel->panel) { + ret = of_get_drm_display_mode(child, + &channel->mode, + &channel->bus_flags, + OF_USE_NATIVE_MODE); if (ret) goto free_child; + + channel->mode_valid = 1; } bus_format = of_get_bus_format(dev, child); @@ -732,15 +688,6 @@ static int imx_ldb_probe(struct platform_device *pdev) static void imx_ldb_remove(struct platform_device *pdev) { - struct imx_ldb *imx_ldb = platform_get_drvdata(pdev); - int i; - - for (i = 0; i < 2; i++) { - struct imx_ldb_channel *channel = &imx_ldb->channel[i]; - - i2c_put_adapter(channel->ddc); - } - component_del(&pdev->dev, &imx_ldb_ops); } From patchwork Sun Jun 2 12:04:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682800 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 718F53A28D for ; Sun, 2 Jun 2024 12:04:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329896; cv=none; b=AgvYmGYIVNytY2lP65EOgBx3BXXxIfnnf9g64NXcV8DRpupqKD6h/BwMNPB63rWgmJNQEMR68mKQASGMTzqb8/pGqDIdBPz/wch3ZaxbA/kqAf3uuxUWU+dPO/JuDQW3SyxmoKubhbzRVTxXEiXLiSKNCD7RoCXbwSbrLmBiTtI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329896; c=relaxed/simple; bh=WBClGWrNVswdIn4UlsSFs/7q2W6RzczPr0uXKZRLUaE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=o3V8ZpNcyc33CG7sLfrC5TS/rU7+NKC/bEWPI/cLD8JrM3d13mgNXCqhZ9s6EjA+hNCUudf98qNPlHheSI6LroKtaH1JY8J8qJswbxJAwIH9uEUdMeOghQroMzAbqIsCmjx3UupravpGWbtl6diTdfQT5P9/lQb11zYiRiuNH80= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=UWIInzZ/; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="UWIInzZ/" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-52b8bb0c059so2518011e87.0 for ; Sun, 02 Jun 2024 05:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329892; x=1717934692; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=gC4tSJBea8UmW/N+lhpg1fIpD1gqTE3H4TGkKQw6PNs=; b=UWIInzZ/vS4zbZEdqexSdKlxL+KMVx0yXYwFKncApE42ct0y7N9UokbbI8I+oJlTi8 E9EH2VvK60+qlZveObHjLQTV5Di452kvnUVACY9dz0hKGf3hvxmo7zDNpVudpMYCWjGj VWXWCktqHd9kSq1f3WfAJNiOj0eDKfipc0zZNWjHldCc2pM+FL8GFQi7YDlDtSiqlQnv G5T2bTdtcBs8wCchH1my/QGbCelKrubuI5lE3ugjvJSmSO+K7m8NZtx7qCflE29XHEUH G+g+3ZcEKsyZpAJZ95UGIOpW0nl0DnpkjvlZ9xwVBPCir1L4o0QlX6v3oNjtr0BgTOdM GQ2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329892; x=1717934692; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gC4tSJBea8UmW/N+lhpg1fIpD1gqTE3H4TGkKQw6PNs=; b=YSG+nzltOEW1e4AKijn1ee0b0HETmRPvOwOCvWUEtWuQKPTUQ4DGhKaFuHrgvE1ZVy 1OxH+Lro2tvuZ+H/pZywbqo8/b75Ql+bcZvYWJxUBzyzgLx7rOKNuCZfJe9BfCBh4vXk Fckf9Qi2rmS2TpY7T3/h9xuxudYi8idL7ksmIFx8O1ATpyRM7DK4ErhVHdRtO8up3Ie9 602Y4cS8GazULB/Zx9v4JWDgxmwfltAuUMrir4vJOUBslwqikG1PzXCHQcUkesDtyKcf GFcVIBLZ21oBRdnJsbqBE5qpxcrS8Y2UZTMFpXogQbCdiLGMRlFZ/uJOpXXRdDN7UK8H 9vTw== X-Forwarded-Encrypted: i=1; AJvYcCWIYTbpV3tpJzW6MXpV8uVzItsD+FRExD+SHO3c8v5omlMiCWU0J3stHH+Ecrl9F+78tdnRRUS+qy9y7v88G4RbPOUF X-Gm-Message-State: AOJu0Yz1299VsBVhpXeRLbvhsCdpVhejLrM5SEFospFyFNjvuj/yNbNW 3pir+OVRBolc0ijit8Of7YJdfNCZXeB0i41hwKxAaEWzv9hKDmyk544+Y59Cma4= X-Google-Smtp-Source: AGHT+IHXq2dXnaN4xvg4VJ6ZhYzE3eiC4TjSwrCDwgXw0dsCBzUpfF8VdkGxF7KGe/zlEOchf5dRmQ== X-Received: by 2002:a19:7708:0:b0:51d:3f07:c93c with SMTP id 2adb3069b0e04-52b89560924mr4547518e87.3.1717329892477; Sun, 02 Jun 2024 05:04:52 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:51 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:47 +0300 Subject: [PATCH v3 07/12] drm/imx: ldb: switch to drm_panel_bridge Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-7-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4752; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=WBClGWrNVswdIn4UlsSFs/7q2W6RzczPr0uXKZRLUaE=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/dMKaGCWF4xzbQpN9kDrjKai+DQFg5AY1OU B3N3BGopfKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3QAKCRCLPIo+Aiko 1W8bB/0W9wht582BaLK/4++Mstz6lJY9J8D8p9faJd+tTSYsGFkysEZkXrFJ3nZhT6mNGzNkRQ6 QXSlyP4rfJ1d3lmEYkjo8fN09pK9Sp+lx8c4+F7Kvp7ck8Y/1OeMIu/LitOdjJW3trxUGqD2u8I uocvla1K0+SsLtT1KrA/z9bh/OFaXpX7DIMbjB3hce0HIv0BIT/adoGSrinENUDL/uRN1i8/wl1 nd4klFahiXtNXeALmLY7inN9GTE/cThbtJyX3Uz48ReTPC+hjdRO8GVmXmWx7HPyMpTZwXpNEOa 9XT024wPuNoOU5VQ5xKjJ8rPzjXFeI9wvCpCHkXx2E+UgVpc X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Defer panel handling to drm_panel_bridge, unifying codepaths for the panel and bridge cases. The MFD_SYSCON symbol is moved to select to prevent Kconfig symbol loops. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- drivers/gpu/drm/imx/ipuv3/Kconfig | 6 +++-- drivers/gpu/drm/imx/ipuv3/imx-ldb.c | 44 ++++++++++++------------------------- 2 files changed, 18 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index bacf0655ebaf..6abcf9c833d4 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -26,9 +26,11 @@ config DRM_IMX_TVE config DRM_IMX_LDB tristate "Support for LVDS displays" - depends on DRM_IMX && MFD_SYSCON + depends on DRM_IMX depends on COMMON_CLK - select DRM_PANEL + select MFD_SYSCON + select DRM_BRIDGE + select DRM_PANEL_BRIDGE help Choose this to enable the internal LVDS Display Bridge (LDB) found on i.MX53 and i.MX6 processors. diff --git a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c index 3f669604377e..bc7ad9697130 100644 --- a/drivers/gpu/drm/imx/ipuv3/imx-ldb.c +++ b/drivers/gpu/drm/imx/ipuv3/imx-ldb.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -64,8 +63,6 @@ struct imx_ldb; struct imx_ldb_channel { struct imx_ldb *ldb; - /* Defines what is connected to the ldb, only one at a time */ - struct drm_panel *panel; struct drm_bridge *bridge; struct device_node *child; @@ -135,10 +132,6 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) struct imx_ldb_channel *imx_ldb_ch = con_to_imx_ldb_ch(connector); int num_modes; - num_modes = drm_panel_get_modes(imx_ldb_ch->panel, connector); - if (num_modes > 0) - return num_modes; - if (imx_ldb_ch->mode_valid) { struct drm_display_mode *mode; @@ -193,8 +186,6 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder) return; } - drm_panel_prepare(imx_ldb_ch->panel); - if (dual) { clk_set_parent(ldb->clk_sel[mux], ldb->clk[0]); clk_set_parent(ldb->clk_sel[mux], ldb->clk[1]); @@ -233,8 +224,6 @@ static void imx_ldb_encoder_enable(struct drm_encoder *encoder) } regmap_write(ldb->regmap, IOMUXC_GPR2, ldb->ldb_ctrl); - - drm_panel_enable(imx_ldb_ch->panel); } static void @@ -311,8 +300,6 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) int dual = ldb->ldb_ctrl & LDB_SPLIT_MODE_EN; int mux, ret; - drm_panel_disable(imx_ldb_ch->panel); - if (imx_ldb_ch == &ldb->channel[0] || dual) ldb->ldb_ctrl &= ~LDB_CH0_MODE_EN_MASK; if (imx_ldb_ch == &ldb->channel[1] || dual) @@ -346,8 +333,6 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) dev_err(ldb->dev, "unable to set di%d parent clock to original parent\n", mux); - - drm_panel_unprepare(imx_ldb_ch->panel); } static int imx_ldb_encoder_atomic_check(struct drm_encoder *encoder, @@ -640,13 +625,15 @@ static int imx_ldb_probe(struct platform_device *pdev) * The output port is port@4 with an external 4-port mux or * port@2 with the internal 2-port mux. */ - ret = drm_of_find_panel_or_bridge(child, - imx_ldb->lvds_mux ? 4 : 2, 0, - &channel->panel, &channel->bridge); - if (ret && ret != -ENODEV) - goto free_child; + channel->bridge = devm_drm_of_get_bridge(dev, child, + imx_ldb->lvds_mux ? 4 : 2, 0); + if (IS_ERR(channel->bridge)) { + ret = PTR_ERR(channel->bridge); + if (ret != -ENODEV) + goto free_child; + + channel->bridge = NULL; - if (!channel->bridge && !channel->panel) { ret = of_get_drm_display_mode(child, &channel->mode, &channel->bus_flags, @@ -658,15 +645,12 @@ static int imx_ldb_probe(struct platform_device *pdev) } bus_format = of_get_bus_format(dev, child); - if (bus_format == -EINVAL) { - /* - * If no bus format was specified in the device tree, - * we can still get it from the connected panel later. - */ - if (channel->panel && channel->panel->funcs && - channel->panel->funcs->get_modes) - bus_format = 0; - } + /* + * If no bus format was specified in the device tree, + * we can still get it from the connected panel later. + */ + if (bus_format == -EINVAL && channel->bridge) + bus_format = 0; if (bus_format < 0) { dev_err(dev, "could not determine data mapping: %d\n", bus_format); From patchwork Sun Jun 2 12:04:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682801 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 571EA3B1AC for ; Sun, 2 Jun 2024 12:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329897; cv=none; b=f/4kUOMHfoEz6sfYLuWCcXnnZuaW6WDenpZLp6WpEVXs9eTTkZsWKJU/bAtsBIWaC2DME2rayDAb/D6/p849cE9nw4pamL5GpgVTjtl3dJ2HQaL/5+W5Jdj/MmBaS33UiGuPcr+pcuMdp5QTkYOeI94Og/vT0sMDsFEZ9inPSyE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329897; c=relaxed/simple; bh=g0HHFds0a5m+nPSqV1AB/dYMtVHavA5UQkGivvC5OrQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qL2Th0IMBDIemZY8apmtgb29dKVDJd8kQS9YLwn4oNHcQdKVvD/9i4UO9wcA8OzOJImB0JwHFgNOa3BiPJFKMLnvJuWP7xEqtxD4XJlamgcrQFhwyDrRNADqx4ZD8lAnpaFF/mnUXQLH+jlkU7G1TV5jwo27Y9Q4XsRd9c1UW1c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=JPQaoRGQ; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JPQaoRGQ" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-52b82d57963so3289774e87.2 for ; Sun, 02 Jun 2024 05:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329893; x=1717934693; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=VGU3KUiVmuFO+I88v9Ywk6Wx4j7BTcNcPl2nGJzsGdg=; b=JPQaoRGQAu4dSMsM8aijIUpxixxvAM/t8bHxOJd1lsc8jxtTvr8hHrX39Kv6beZQNH 7OWcLpUCWaDODANbg126EehT17Oe7vs259oiikFtXCoRU16eCK15+/C0zDwWztj89nak 8ACH71D5VDVv0QQug6yEBaJHVqAEYB3ixLHJEg4YfFtBU9evf9m4II9R/J24Gpu/Nonn kWZDAFDsZoeVYLhlsBQi0wu9LW5mmCy1Vegz7/V0dQ9mPsYOq23sfdggDi00Qn41X81l GoeX5YPeH8tjhSvIVY+GGjfu68whS0ZbX9Arzx3lZom4DqFgNsjLN95xS2/KRr7r/vGE AB4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329893; x=1717934693; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VGU3KUiVmuFO+I88v9Ywk6Wx4j7BTcNcPl2nGJzsGdg=; b=cdiuVTpFo7ifziOAGxvR5xA0AFHr8lRRLYiIVzU2hkkHhmn8bB4umWSLcGhuTlFZA+ kk8hob+2uc91yuHsQkmcCmfU20LsFxbZXdbIYAQdu1ehZkzY+w/UajFx3SfT0GR5bJCu gvXaWem1VZR8kZUhEnoQO4ZFvjAbZ4UlwSx5nAwT95D1e9HxBFdjhv2+snvnPW+YoEZD e0mVBvqgivT7f5Hmr4r5E3wupPov3kKQ2YjaFkX42BcXdkUr1cw6OSTpFUBdDUjO1JVJ g1cAv1/d4qJyOgvrWsZqncymfYQG3/nB+3/S+1Xof2c20h926KEwLalGC23LSKFn/yos j9GA== X-Forwarded-Encrypted: i=1; AJvYcCV364XQuv3d0bbPJEcRHmnJVcCePMc1NtPcnjtkbKbAbo6M23AWkFwJs2FcDilP1rg0QLlfo5MsmiCNlItHmi2ACdYJ X-Gm-Message-State: AOJu0Yw8p9KDjKhTflOwHLA5IwW8wtTeCxGQjDw/7llLJEDHF9JrwZl4 dpqNwKuiS/f1bN6yJTcxIuI+2mdBzK9P6bRg0d/yP5XX4G82D7sErgyEaIJigNM= X-Google-Smtp-Source: AGHT+IF7TZ4Bpm/utFW2oKfvXnr5l8lwnBKGc7QMlT6c7QNw81zMgz7FkneTI496TxRY8A1Eax7xNw== X-Received: by 2002:a05:6512:250:b0:523:90df:a9c6 with SMTP id 2adb3069b0e04-52b896da5f9mr4155392e87.50.1717329893396; Sun, 02 Jun 2024 05:04:53 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:52 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:48 +0300 Subject: [PATCH v3 08/12] drm/imx: parallel-display: switch to drm_panel_bridge Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-8-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3514; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=g0HHFds0a5m+nPSqV1AB/dYMtVHavA5UQkGivvC5OrQ=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ1pM/N3E6kytV+tmb/OYlNH0h9MlaeGx8gffX3z6ynyX9 caZ8vbTnYzGLAyMXAyyYoosPgUtU2M2JYd92DG1HmYQKxPIFAYuTgGYSC47+18Rn7eeLQY3ckTl xSu1Iz4Z/Xn5qIi1ednvXUFJtdMYbJ99PvY10Xr/1fSPWYaaitEJXFmO7/Wv1nze8PNZn9PdzYZ KT/QrYhfMXD91JlPxmWnrpv9T3qkhvtP92X+j1sKvcxrmPTQwcVPszZ6us+5wl17LzOXKNQZxqb 2XjBSTKvX/adtf/OWmM4u35XdmaOqEe4WVL0vW+D8I6HdjS9HMEme5OqU7PeDBrGz3fZ6y39JdK xy4zMr5N9dVyuhKZz3sWVzhFNP4Mou/oeW+3obl//UizA3lts4XPrm+yI5rh2r/jIcPvr/L3NCs tK0pv6Rm6l7NHnVV7xLTZLdviWv4jJe6KXN/Ol8clr4UAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Defer panel handling to drm_panel_bridge, unifying codepaths for the panel and bridge cases. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- drivers/gpu/drm/imx/ipuv3/Kconfig | 3 ++- drivers/gpu/drm/imx/ipuv3/parallel-display.c | 36 +++++++--------------------- 2 files changed, 10 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3/Kconfig b/drivers/gpu/drm/imx/ipuv3/Kconfig index 6abcf9c833d4..f083d313d1d3 100644 --- a/drivers/gpu/drm/imx/ipuv3/Kconfig +++ b/drivers/gpu/drm/imx/ipuv3/Kconfig @@ -11,8 +11,9 @@ config DRM_IMX config DRM_IMX_PARALLEL_DISPLAY tristate "Support for parallel displays" - select DRM_PANEL depends on DRM_IMX + select DRM_BRIDGE + select DRM_PANEL_BRIDGE select VIDEOMODE_HELPERS config DRM_IMX_TVE diff --git a/drivers/gpu/drm/imx/ipuv3/parallel-display.c b/drivers/gpu/drm/imx/ipuv3/parallel-display.c index 4d17fb96e77c..9ac2a94fa62b 100644 --- a/drivers/gpu/drm/imx/ipuv3/parallel-display.c +++ b/drivers/gpu/drm/imx/ipuv3/parallel-display.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -36,7 +35,6 @@ struct imx_parallel_display { u32 bus_format; u32 bus_flags; struct drm_display_mode mode; - struct drm_panel *panel; struct drm_bridge *next_bridge; }; @@ -56,10 +54,6 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) struct device_node *np = imxpd->dev->of_node; int num_modes; - num_modes = drm_panel_get_modes(imxpd->panel, connector); - if (num_modes > 0) - return num_modes; - if (np) { struct drm_display_mode *mode = drm_mode_create(connector->dev); int ret; @@ -84,22 +78,6 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) return num_modes; } -static void imx_pd_bridge_enable(struct drm_bridge *bridge) -{ - struct imx_parallel_display *imxpd = bridge_to_imxpd(bridge); - - drm_panel_prepare(imxpd->panel); - drm_panel_enable(imxpd->panel); -} - -static void imx_pd_bridge_disable(struct drm_bridge *bridge) -{ - struct imx_parallel_display *imxpd = bridge_to_imxpd(bridge); - - drm_panel_disable(imxpd->panel); - drm_panel_unprepare(imxpd->panel); -} - static const u32 imx_pd_bus_fmts[] = { MEDIA_BUS_FMT_RGB888_1X24, MEDIA_BUS_FMT_BGR888_1X24, @@ -237,8 +215,6 @@ static const struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = { }; static const struct drm_bridge_funcs imx_pd_bridge_funcs = { - .enable = imx_pd_bridge_enable, - .disable = imx_pd_bridge_disable, .atomic_reset = drm_atomic_helper_bridge_reset, .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, @@ -315,10 +291,14 @@ static int imx_pd_probe(struct platform_device *pdev) return -ENOMEM; /* port@1 is the output port */ - ret = drm_of_find_panel_or_bridge(np, 1, 0, &imxpd->panel, - &imxpd->next_bridge); - if (ret && ret != -ENODEV) - return ret; + imxpd->next_bridge = devm_drm_of_get_bridge(dev, np, 1, 0); + if (IS_ERR(imxpd->next_bridge)) { + ret = PTR_ERR(imxpd->next_bridge); + if (ret != -ENODEV) + return ret; + + imxpd->next_bridge = NULL; + } ret = of_property_read_string(np, "interface-pix-fmt", &fmt); if (!ret) { From patchwork Sun Jun 2 12:04:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13682802 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBCBC39FF4 for ; Sun, 2 Jun 2024 12:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329897; cv=none; b=AZEh3mnT0Hbej1X7eOT3ppkwMF29DEcRXaZnYrPx/Bay8IqnRTKcOWlIUqr7+KCP9z96t83VG2xzb6eotd+9iTKXfb/GkH9n1TZ1Sz/QA5OxMVj5W8hHi3/p/rMSAj94W/qSrx9HogJ7Rnl/MxLfsx4Ts+pOOMltChtMc+DA0qI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717329897; c=relaxed/simple; bh=5qwH6l5MO1K0SbjK3RylTsbBZG/ntitWTbJUNUocDzw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XLkBJOwAmMtV2NBxXK9H8DMBPyHeoS7MYQah1NqxGYS+Ki99Td0y7p6Y3taXy+Juuo8WnlzRtr7n0UN8iQnNRcc+AhrMohPlBUJqA223wu9IUZWNoGN3ZXLVZCgoFUrqXtZMlutcKkeWVQep/YMuNEahnPX9ACFAa1+n0Jh1Cl8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=QTEbhsce; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QTEbhsce" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-52b83225088so3032815e87.3 for ; Sun, 02 Jun 2024 05:04:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717329894; x=1717934694; darn=lists.linux.dev; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YwLGlhS8c4MSDhZlnMfqrMoYx9jr0+buWOu6Q2vrZUo=; b=QTEbhsceXJ5RGXPzKVWCfX9sgL1p2lXE5Jeqq+v9oIvgcG78JmQ3TDuv6qMUGvZq2u s+iBoz5EBfJkS0cPRwK20xkL46XrxSas58BUzWBcF4gUh95xthJBfyGWGxnpegLtL5X9 vwjkme2vd5MBTFBHUVEFVNNDKFwNpjTNZwgq3XM67/hrHvuxQX85K0csc3e3qGlOL+9S 3Z4U39TJdId17CO8U+VLA5P6TNdqn+/8lY+6qI28jW+BwWpU/czkVV8+aLg2BwM3Ki0a CSg0bg1zNlEJmJSCq6RJoSvLmeoYBhidJnZCzvqpOGU8V1n2AMWSdF6BcxSgYKLFsP8C tIrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717329894; x=1717934694; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YwLGlhS8c4MSDhZlnMfqrMoYx9jr0+buWOu6Q2vrZUo=; b=tRYKuCtBLwvWPWyKST+PAnM1/88E/5WqxOYuwc6OB9naZUoymkRhaJJo9VlwSutkSe gTTuEGFO6Hj3mAQiL229iMEvbeuIV4Gasp6WLZOFsvjmm3avTC9hFqKKJPvfplHo7ifM 1rJtZ23AzP6gszHsQqImZ7d+n1E/UV75jpyB7Yb8cqToEnRnmvG9+RCknVbsXOWaJcc5 KFUIhDzL56qz5C9m6T0IDyYl58X4nSsAuu6qZgd484/PgZ2luwzy/Mb4lYuMTOQU0k0T 94izJXEA9lKk5U7nMRKqkF9hiOYye9LAAHIvChmOX6sjMUxVmU4xFJ3aVHWiqFKA8nSo vswQ== X-Forwarded-Encrypted: i=1; AJvYcCVy8BYWOpRkATXPOIvtzoMQPtFsGu7D4lG30sktube0H1wrrDTsOw1DKYal9/n7V7g6ahGgb5YXsbdVn5rWgJntH2+s X-Gm-Message-State: AOJu0Yw//IWX1kA4mUDRb5fkUvi4vAsMN4vqkxHXf6dGDwJH7e19Sa7M hmEfoyV4QeKpFm6Z3DGgjrNRjI86CZNH8vcKbV/Ruoae55fsNKO6s2G2EBGEORk= X-Google-Smtp-Source: AGHT+IHQTqu9po4Q58mn5dmh/iNF52AD9wdFkQoRIF/Qt4N/Ulzqw4wOqZkzdJsVft3tRiPNgYeHdg== X-Received: by 2002:ac2:4556:0:b0:526:81ab:191 with SMTP id 2adb3069b0e04-52b8970078fmr3604279e87.60.1717329894052; Sun, 02 Jun 2024 05:04:54 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b8b56867fsm759398e87.44.2024.06.02.05.04.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 05:04:53 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 02 Jun 2024 15:04:49 +0300 Subject: [PATCH v3 09/12] drm/imx: add internal bridge handling display-timings DT node Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240602-drm-imx-cleanup-v3-9-e549e2a43100@linaro.org> References: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> In-Reply-To: <20240602-drm-imx-cleanup-v3-0-e549e2a43100@linaro.org> To: Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Chris Healy , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4905; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=5qwH6l5MO1K0SbjK3RylTsbBZG/ntitWTbJUNUocDzw=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmXF/d/Fah3CGztXwsM4kY3CMDCT+cEaYdiMGWa 3/3qeABMJSJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZlxf3QAKCRCLPIo+Aiko 1YFGCACQRurwdwe8yveOmxw8xeQgho8g6nkzyJ3kQ+gCq9JB2tSgAze+ZI4VDVW41MZ5u77trMB jfxDeC7F4oSTGz0+cvoLiqd5iFxLg7fOsLjLaW0XsFp5HqR2Ujgj69oLKtl3eCZwW93VtLwVjCV QF20Qc398qLsZoCWU/DUtwvUYH2kchX/mmQ/gLK9qeM+b8/FuKCix3CWW+BrLY3dWXAy5bxKdFS vUdTre5Ulmcdhsz8hpehTUDFyUjcRd3913TosViZUGou2j6GgO3dytGOOZ4mZIuzqodgchDtXBv Ma13/Sp4iomIpGUDn+j9HQWTADrjoZgk42vPGI3UD63QZZHP X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A i.MX DRM DT bindings allow using either a proper panel / bridge graph to provide information about connected panels, or just a display-timings DT node, describing just the timings and the flags. Add helper bridge driver supporting the latter usecase. It will be used by both LDB and parallel-display drivers. Signed-off-by: Dmitry Baryshkov Reviewed-by: Philipp Zabel --- drivers/gpu/drm/bridge/imx/Kconfig | 10 +++ drivers/gpu/drm/bridge/imx/Makefile | 1 + drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c | 85 ++++++++++++++++++++++++++ include/drm/bridge/imx.h | 13 ++++ 4 files changed, 109 insertions(+) diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index 8dd89efa8ea7..9a480c6abb85 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -3,6 +3,16 @@ if ARCH_MXC || COMPILE_TEST config DRM_IMX_LDB_HELPER tristate +config DRM_IMX_LEGACY_BRIDGE + tristate + depends on DRM_IMX + help + This is a DRM bridge implementation for the DRM i.MX IPUv3 driver, + that uses of_get_drm_display_mode to acquire display mode. + + Newer designs should not use this bridge and should use proper panel + driver instead. + config DRM_IMX8MP_DW_HDMI_BRIDGE tristate "Freescale i.MX8MP HDMI-TX bridge support" depends on OF diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile index edb0a7b71b30..dd5d48584806 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_DRM_IMX_LDB_HELPER) += imx-ldb-helper.o +obj-$(CONFIG_DRM_IMX_LEGACY_BRIDGE) += imx-legacy-bridge.o obj-$(CONFIG_DRM_IMX8MP_DW_HDMI_BRIDGE) += imx8mp-hdmi-tx.o obj-$(CONFIG_DRM_IMX8MP_HDMI_PVI) += imx8mp-hdmi-pvi.o obj-$(CONFIG_DRM_IMX8QM_LDB) += imx8qm-ldb.o diff --git a/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c b/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c new file mode 100644 index 000000000000..fb3a030928f0 --- /dev/null +++ b/drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Freescale i.MX drm driver + * + * bridge driver for legacy DT bindings, utilizing display-timings node + */ + +#include +#include +#include +#include + +#include