From nobody Mon Feb 9 09:01:00 2026 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 9749F36AEC for ; Sat, 30 Mar 2024 15:00:50 +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=1711810852; cv=none; b=I5x+Z8i1xS+qaGsDfmZpFDKIqlm7Dg954XNy0IkL3eeyaqETnZdTn7vE4PeTOadGEuTPIwnd8I7xyAvBxVSuKaly753dbybc2V6+zQkNQqaVkfE7dnWEQUyC5hcSOMcBDntEwMotb8gZxaZDcpSY9XKSS1fmZ4vhNi1k3/OyVww= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711810852; c=relaxed/simple; bh=HU+wa7woAnHSS2dl5LU/WB4CeOKcUqRCEklmEfoGWUQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=D8WhK6oQiVJrW9cMoB4ytPKxfL1x/rVmch72VeOXYFv8N8QOqsV/9mFVHniV1d9rcbwiDYUk+KEoRH5crUAfhsT6SzHVPzdviOmldaYI/mlvTrtPdwftvblXrzlMdRgW5FxHo7O+pnBKWwdrMw/Lv7FwwY2Gj+TUG8pXmpWHViM= 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=m6flh9OR; 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="m6flh9OR" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-515c198e835so3072055e87.3 for ; Sat, 30 Mar 2024 08:00:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711810849; x=1712415649; darn=vger.kernel.org; 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=+eEH0u79NHtVDKA13PPuTSc6hJlgwppuYqct0Olpnw0=; b=m6flh9OReFCMiA/YZfFoCFO2kYl6I6NhQ/eHN4u7jbBeHK6A1h85erWaFo2gzlVCBV mFSODyoDYdhHAS4BsduBCsx0TYmiZQBHf0HBVUIbAdVF9Tjs1HfYeozQ2Pa9KkjtRWty L0WM0pBYSJKk87yiqoK4Z/TBlASrWDelh51B5TxDiBnxmTOjl0LBSwhM6aoGdOlp6X2m a3dwXnBfWxNpZPMcsJnM9IM75pUHb7RLwPhLub6jf+SCNVbNSMLVrebu551oy+9PhOQd rnDxbNNmQRUvR5piBQVTE2J7b4Q0ew07h96fQ1Dnf3tCQlQtyEwscc4e+T2ZUAuAA5cV AU2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711810849; x=1712415649; 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=+eEH0u79NHtVDKA13PPuTSc6hJlgwppuYqct0Olpnw0=; b=DTRTpvP4s8xCiONjWX/JtNjtPOyT7e/ol7T48vFTQrY3oisheSwbHWmo77uHn2fH9U qbFjcNDn7s/4FXcjEzD1MruMfpvhL3pZBtpxfWiRgQTdTe2nKx+xrAMBL4z1zSlT9XQw FvEY+MraZzRSG0QaSa2xeGfHhC0G5jJXG/3exq1n79e+O1Fohv9W7rd308siTIOWkdEk J7HzJ/ZyTG2+AdqNgh/GkugDZvG1wkKrso9Q5qeGfRq/LR0xKcooJ8+TsFqorv59ScW+ Tw9Jhw/68GL6S5xJmpTJINKc8ZRWdWx9DZuR0HX3PnAakuCTkbV2yMn0JTjGUkL/Sx7A lVtA== X-Forwarded-Encrypted: i=1; AJvYcCUwzcod9z1w338hku9a5OiL9rp5VyBf/yPufByhBsyknwzYO+hlo0/XsYJWn3hE+dNB4CGV0PZgqflqvbLriVNu1pyUaxfSf/yoEQmc X-Gm-Message-State: AOJu0YxkrTk+ygXVOh4glce6TteZ2nxsPGsInYUDXrQ6krmlIJPBoyek YgS2sQidVCQqBh6NK3dMqolZswLp1yAYaAhEEBTGO6/4/i6FAAT8gVXr6h+0zdU= X-Google-Smtp-Source: AGHT+IH4Tqjo7n+gZfDWHfbp4pn41LKNbDyjcyYgbbfVlJT7z8EA4U+nfZQJN3EKM1ToKIW0H6Fz6g== X-Received: by 2002:a05:6512:31c1:b0:513:cf75:2ccc with SMTP id j1-20020a05651231c100b00513cf752cccmr4944654lfe.0.1711810848812; Sat, 30 Mar 2024 08:00:48 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j5-20020a056512344500b00515d205a6f0sm496199lfr.29.2024.03.30.08.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 08:00:48 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 30 Mar 2024 17:00:46 +0200 Subject: [PATCH v2 1/3] dt-bindings: panel: Add LG SW43408 MIPI-DSI panel Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240330-lg-sw43408-panel-v2-1-293a58717b38@linaro.org> References: <20240330-lg-sw43408-panel-v2-0-293a58717b38@linaro.org> In-Reply-To: <20240330-lg-sw43408-panel-v2-0-293a58717b38@linaro.org> To: Sumit Semwal , Caleb Connolly , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul , Caleb Connolly X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2135; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=12rUl+2HnN8d7afCUpo5jilPDeMfLdH1F3n7T397uIk=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCCke8taj0wJ8X25rcsRC2l4+1FyzH+0L4pQEl PR5XN45bp6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZggpHgAKCRCLPIo+Aiko 1dgUB/9Cy9Youl9yPUldBL810Zn8CCZQKNyF9iQbeAOAtEWQ0mzurRp1QWj3JhIgeIEtsvoMTZz ZpDFHdscoQzHkbDfoNYE94D1ikHhhPGT23yTeruJMAGLITZncwrk1BUngFD1tjDpgfQOl9+SkbD X4uBi6Q+IXETGPTWmrn2w95UozYHKavRJFhJEgiSTO474Ffssaay9XvQ6Peq3we1Jk47/cBdL5D uRG1QNXjc1gA8I1kYTR5Z2ExDqlxea/kCr/AiuZb+qEx6o1Vc8FIJq0CY+9ghyypA5tW4k8GcvV 8mDQAHBf5LvJITEFgHGyotsJEB+DGuZan6fpP9Cj7Di3P7RJ X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A From: Sumit Semwal LG SW43408 is 1080x2160, 4-lane MIPI-DSI panel present on Google Pixel 3 phones. Signed-off-by: Vinod Koul Signed-off-by: Sumit Semwal [caleb: convert to yaml] Signed-off-by: Caleb Connolly Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski --- .../bindings/display/panel/lg,sw43408.yaml | 62 ++++++++++++++++++= ++++ 1 file changed, 62 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/lg,sw43408.yam= l b/Documentation/devicetree/bindings/display/panel/lg,sw43408.yaml new file mode 100644 index 000000000000..1e08648f5bc7 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/lg,sw43408.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/lg,sw43408.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: LG SW43408 1080x2160 DSI panel + +maintainers: + - Caleb Connolly + +description: + This panel is used on the Pixel 3, it is a 60hz OLED panel which + required DSC (Display Stream Compression) and has rounded corners. + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + items: + - const: lg,sw43408 + + reg: true + port: true + vddi-supply: true + vpnl-supply: true + reset-gpios: true + +required: + - compatible + - vddi-supply + - vpnl-supply + - reset-gpios + +additionalProperties: false + +examples: + - | + #include + + dsi { + #address-cells =3D <1>; + #size-cells =3D <0>; + + panel@0 { + compatible =3D "lg,sw43408"; + reg =3D <0>; + + vddi-supply =3D <&vreg_l14a_1p88>; + vpnl-supply =3D <&vreg_l28a_3p0>; + + reset-gpios =3D <&tlmm 6 GPIO_ACTIVE_LOW>; + + port { + endpoint { + remote-endpoint =3D <&mdss_dsi0_out>; + }; + }; + }; + }; +... --=20 2.39.2 From nobody Mon Feb 9 09:01:00 2026 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 79F8E381B1 for ; Sat, 30 Mar 2024 15:00:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711810853; cv=none; b=fO6jT/yp/g/pJ2v2aFIIX5/ZvX7rNidyfUoryB0ulzcr/7ve6Lul0e7w2Rc2Jm6q3t1rqXRCOmq1QMkFqFVZwdpa2b57VPaewCLa30IjhmW+wr7AckY5+cXJjWti5tPUQt3DWP5S1YpkM0t9Eox33ZtXUww5PEZj1G8dWOQcJpg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711810853; c=relaxed/simple; bh=1dHUwNPq/ZE2lZqujLo0paqKG5T8bLmbO34BUbpj00o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QKNO2DHEKntHAMPmDXU06Yp6bxTJZGCpjzogaWRaJx/JVNGeKR6UVW5auQe7ysqRhmAyfEgR82GhY/VuOD1sGfb4zifd4k0S/sX1X7HcA8ievbYtzERnCEZMjoMxXY5+zMfzavbjn418KNvG/tHseHXUzXAXixInLkRMC4bMAh0= 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=gtCsKv+d; arc=none smtp.client-ip=209.85.167.50 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="gtCsKv+d" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-513dc9d6938so3419562e87.2 for ; Sat, 30 Mar 2024 08:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711810850; x=1712415650; darn=vger.kernel.org; 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=gXi248XgYEI1aNqzH18MSPcwgnE2Ghs0byyxqmpezB8=; b=gtCsKv+dh1XW7l/OgJ/9/rkro4yh0wbepgUEI85r2zZl8DMzpCd1HXDgUUsJmci1V5 F+bo3PfioSAcZeqowVAZouWe6qWsYqcpkoJi+0Y5liBbDocWPqwlvtgUm0aaQ79D8wf2 foCiAQx+4YTyMA6O3DTjJx8cx4JZQV8XDQjIr4PskgURxmVR35E5+wcrQCst/DIvWoCi ofFOUf16SmiVo8nMbkuK1MTKCfcok3R/iCqMaCd8B5U/NzaqZH+pkGUx4w63BmqUSmCj dlEH4VWZroDcLwKAEqnEaNLO2q+VPY3twtwK+FU1JDOgVyojtLE+7fhMt+0LAH1n6OuJ RFtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711810850; x=1712415650; 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=gXi248XgYEI1aNqzH18MSPcwgnE2Ghs0byyxqmpezB8=; b=IbH3kDaqnqR+X6atp7VDJTFwENWAwdv+SIuUdgoBP9GY72AeZr9BkU5PYg7k9OWk8G sqQev9NRtLWcE29UWPLksxp0GNl3hHVcWk08GzQIBDMTybKc3GUxOQ07vrZFj3c4WY91 41Ss5TSEEAD0FLApVnSQiJeJi8uGXFBSRN39GiRtGGHs/gOAUeVz23hTCVj541UzGCXc AOAB/Rgz6/lJeFcz/FTHRl5Ym054KJpNZwc2iC9UeuBJh/IdF+0ljjYAt55IIMAj/rrH eP7v4OgyXHErPQhd4JDBer6sS049ryJZv55y0lIe7h/KI58xuJDh55l31m+YNURSu3Mv eVRA== X-Forwarded-Encrypted: i=1; AJvYcCVG+z26/NMYRLiSKqyTApvA8dSoNCqvZdV/gowPT/aM03INO2QmuUYriXrPn7ZuLkPRDotdpRQ/PIPL8mCZV83CXKHTdbkGuWf6IE58 X-Gm-Message-State: AOJu0YyY9LtXDPBE83pd4ngCB3qn0h1F9qmGzfDup1Q6tsaJSbIR98OG aVnur8BouPBaSOXRvKBJtimlBzcVnTIGJLikfFdTKt2tpjCGvswkR3v02nHr/Ns= X-Google-Smtp-Source: AGHT+IG8fUr3Y+BvOvBw0pX4ptCgxhfFGh8Zgf+AI4HDWWEx9BdVlVw3GH/Lxx9ar3JKgaIyUtFvGw== X-Received: by 2002:a05:6512:1287:b0:516:a115:4a4d with SMTP id u7-20020a056512128700b00516a1154a4dmr813652lfs.68.1711810849633; Sat, 30 Mar 2024 08:00:49 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j5-20020a056512344500b00515d205a6f0sm496199lfr.29.2024.03.30.08.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 08:00:49 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 30 Mar 2024 17:00:47 +0200 Subject: [PATCH v2 2/3] drm/mipi-dsi: add mipi_dsi_compression_mode_raw() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240330-lg-sw43408-panel-v2-2-293a58717b38@linaro.org> References: <20240330-lg-sw43408-panel-v2-0-293a58717b38@linaro.org> In-Reply-To: <20240330-lg-sw43408-panel-v2-0-293a58717b38@linaro.org> To: Sumit Semwal , Caleb Connolly , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3402; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=1dHUwNPq/ZE2lZqujLo0paqKG5T8bLmbO34BUbpj00o=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQxqHplxtUqThhGu919/sN//TceXwyktfCwLqyuu1DCecu edwe3F6J6MxCwMjF4OsmCKLT0HL1JhNyWEfdkythxnEygQyhYGLUwAmwvWLg6Gl56nEj66VlVyG xx9G7sxp1d98I4a37MfW5rKYx/57D0022SfSK5Zudy8x/M/8mUYW7Yc9ThV71L7cU7T8hV8zb9h 5pgw2w4Lf7ifi2ITbao2idruvqG/ZLL6u6NBCncKb+juX9E+6N6NKbYFxRr30D/njraWrpp0+Gt A2SyfrqPcN3oeOeqFf49a/SchwTHtYcCy3X2kTC68Dd/+aznOBKQnBn+b9+7igxNzhhZYAW7hfh /VXyRgR7T9B82L/1Gj57mZhm77N1m6dytac701mf7Y1HVglLP9i2y3VNVsCGup2fTa/WhH1dGfu s5M1ng5PEg259jSLOzjsnie21nSjwM1C84fqvde0E3kUAA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The LG SW43408 panel requires sending non-standard data as a part of the MIPI_DSI_COMPRESSION_MODE packet. Rather than hacking existing mipi_dsi_compression_mode() add mipi_dsi_compression_mode_raw(), which accepts raw data buffer and length. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_mipi_dsi.c | 34 ++++++++++++++++++++++++++-------- include/drm/drm_mipi_dsi.h | 1 + 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index ef6e416522f8..f340d1e0a9a5 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -645,29 +645,47 @@ int mipi_dsi_set_maximum_return_packet_size(struct mi= pi_dsi_device *dsi, EXPORT_SYMBOL(mipi_dsi_set_maximum_return_packet_size); =20 /** - * mipi_dsi_compression_mode() - enable/disable DSC on the peripheral + * mipi_dsi_compression_mode_raw() - control DSC on the peripheral * @dsi: DSI peripheral device - * @enable: Whether to enable or disable the DSC + * @data: data to be sent to the device + * @len: size of the data buffer * - * Enable or disable Display Stream Compression on the peripheral using the + * Control the Display Stream Compression on the peripheral using the * default Picture Parameter Set and VESA DSC 1.1 algorithm. * * Return: 0 on success or a negative error code on failure. */ -ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable) +ssize_t mipi_dsi_compression_mode_raw(struct mipi_dsi_device *dsi, void *d= ata, size_t len) { - /* Note: Needs updating for non-default PPS or algorithm */ - u8 tx[2] =3D { enable << 0, 0 }; struct mipi_dsi_msg msg =3D { .channel =3D dsi->channel, .type =3D MIPI_DSI_COMPRESSION_MODE, - .tx_len =3D sizeof(tx), - .tx_buf =3D tx, + .tx_len =3D len, + .tx_buf =3D data, }; int ret =3D mipi_dsi_device_transfer(dsi, &msg); =20 return (ret < 0) ? ret : 0; } +EXPORT_SYMBOL(mipi_dsi_compression_mode_raw); + +/** + * mipi_dsi_compression_mode() - enable/disable DSC on the peripheral + * @dsi: DSI peripheral device + * @enable: Whether to enable or disable the DSC + * + * Enable or disable Display Stream Compression on the peripheral using the + * default Picture Parameter Set and VESA DSC 1.1 algorithm. + * + * Return: 0 on success or a negative error code on failure. + */ +ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable) +{ + /* Note: Needs updating for non-default PPS or algorithm */ + u8 tx[2] =3D { enable << 0, 0 }; + + return mipi_dsi_compression_mode_raw(dsi, tx, sizeof(tx)); +} EXPORT_SYMBOL(mipi_dsi_compression_mode); =20 /** diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index c0aec0d4d664..321d2b019687 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -242,6 +242,7 @@ int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device = *dsi); int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi, u16 value); ssize_t mipi_dsi_compression_mode(struct mipi_dsi_device *dsi, bool enable= ); +ssize_t mipi_dsi_compression_mode_raw(struct mipi_dsi_device *dsi, void *d= ata, size_t len); ssize_t mipi_dsi_picture_parameter_set(struct mipi_dsi_device *dsi, const struct drm_dsc_picture_parameter_set *pps); =20 --=20 2.39.2 From nobody Mon Feb 9 09:01:00 2026 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 5E93638DF1 for ; Sat, 30 Mar 2024 15:00:52 +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=1711810854; cv=none; b=SY4PW4lYqPehlnl1vKzT44DHV0A8VoK2TyEqi6UxCUCjdKWtPWBulwuSi9qg6g6hP/qNx0IhlY9qVrNgviv7PrP+LIPxlgpTTznucHHQkGUIb5E41V62GqRDbW+qtxDYAP7QlpnVH50CgHOjPVwmewK6TOh0re/uxFfyXKYmHqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711810854; c=relaxed/simple; bh=6eyOWDzw9LhAdwHF11NxUmKTnAcKVzQqt7phGeeb+OU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=k2Qeieo6hxJaEu0pGlcsl1qnY4GP9BP9xdmojaBZ1PXw9d0Jo+QotRXToV6AIPAqoiV3dkRWuhjjC7QOw1LNd4Zvixjx4ijhxWa0loDm/o7KfpXg73WmUGR1m6r0LkhHoWLrpu+AYXiYPea9NJOywvIU79Weiz2UI1rGKte0k+E= 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=D3+Otqc5; 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="D3+Otqc5" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-515d515e28dso640830e87.0 for ; Sat, 30 Mar 2024 08:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711810850; x=1712415650; darn=vger.kernel.org; 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=OoeceOXD90b/faMyNELCuqZCbGS4AC8UJzwAJuXctxQ=; b=D3+Otqc5SEgS+zlRd6eB+WjDGnExgq/6uSCckpzFmdPWLzOgqwA5YWFBUYWTRQP4Gb Iy7Ud9Za+AdZEOUl8ieFwd7q7urV0Q0fSpVnvOWYu04ZInW7fYyNF2qXjqOcES3sqTu6 d/VciChFa+bOtjP2LcR9IJQCIIsLDr8qGoO8xCz5gDKZKUAq3Tnhg9YgogLDydEJ1/oL WiXqCYxoJIlMFlznSJ077xqGHhuNVUGwiWckJzx/PrhX+YRj+x2EKukGgyIJw+M4IELW 9WI/Ex6pynVHuGAu1wHmQPX8as/HeMNOIf/6ZdSzhoTDJUW8cw/JjdwVBSsCdCClskwY LlVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711810850; x=1712415650; 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=OoeceOXD90b/faMyNELCuqZCbGS4AC8UJzwAJuXctxQ=; b=LEG1HC2eSPYT0uszaO4rXcCXRrzHUYdAPohiBW/m12AXep7/vDOsTet6kuuzX/5A8F m4kQ8y8Aoiqe3sxvLkAyGGoZ+s4uQzA6hwty0vV4pQ6Sfw9DwFOd0gPOsSIzXTbhFysk 7ylh5ncTZ8wX2+s71RHruqLpI4XcMT3QjqeU/JJTuWJc4o6sa6n5IVtwcSFwGUzlhTa4 ECfxCk5tF5O/aLs4rEpLJIzixuxBlXuetWEca6K2nIWtht0bXyAd7INMe1YAtH6nvwOB 8C/mYAhxdV6JQyvaJkZIdWF6FAjeTnxxTRKUoSmDXw0NLWeEgX+qQlVNLkOjzAyi7y2R waAQ== X-Forwarded-Encrypted: i=1; AJvYcCVA2KhVkOMCFJ/Y4NOF+jQy1FG5dCD0M1jDLI8qoQExHvjIr3v6CVEYrTkrGKszFmv/EdzIZsWehohuQbAt8Ub6lQeRwMNB3sIdyVXm X-Gm-Message-State: AOJu0Yx1IW613N4ZCrXSQu6stB0Ojprtnmh8iU+8qU221L8iQfj8jwYe 9AxJc51bhfel7AYPXlRJ9Jc0tcpbiWNgSR7jGGvxZPmi5J2XlGeXEKpuU/+q9No= X-Google-Smtp-Source: AGHT+IHec1Q0uwQWE8BAAkS24eikCNlNUYUBM6/OoSwgMUeKpOolLXm7mOQbRk6KyKGxs9Tu1tx8AQ== X-Received: by 2002:a19:645d:0:b0:513:5951:61a4 with SMTP id b29-20020a19645d000000b00513595161a4mr3014559lfj.6.1711810850608; Sat, 30 Mar 2024 08:00:50 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id j5-20020a056512344500b00515d205a6f0sm496199lfr.29.2024.03.30.08.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 08:00:49 -0700 (PDT) From: Dmitry Baryshkov Date: Sat, 30 Mar 2024 17:00:48 +0200 Subject: [PATCH v2 3/3] drm: panel: Add LG sw43408 panel driver Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240330-lg-sw43408-panel-v2-3-293a58717b38@linaro.org> References: <20240330-lg-sw43408-panel-v2-0-293a58717b38@linaro.org> In-Reply-To: <20240330-lg-sw43408-panel-v2-0-293a58717b38@linaro.org> To: Sumit Semwal , Caleb Connolly , Neil Armstrong , Jessica Zhang , Sam Ravnborg , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul , Caleb Connolly X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=12229; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=D6vJJI+0cd9TezSGqlz9pC0jmFumI9Fyojywzyt3GeA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmCCkffNwBqAropCyO2l9Jyg07Kxpr10x4DXZIo z9bQSoOw56JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZggpHwAKCRCLPIo+Aiko 1SZ5B/9Cv+ba2KyMkgNicBHJyvACx8mdXa5zay9s9JfnrmHcgAMkkTyvPWJn3cA7lBke+Zj7LwX zz6JpF0DZij96RrVVs3h8HqkOrkHe3F/oVRCPA/jhy7weDjRCr8LZzbyff/cqqLbkFwu8hcsjSS +W0/jxzrtS78N6nd4YQ7G+GOLYd0VN/5BafXu9i6Hqv/FxwsynObGSnk/zzQ9ydQ/9RbKYnWwbg ayQ+dEXOTThpxdIbVZkughUOUtEAnqh94MenrmDUqFR988DJTrNs6M7UF6AjIPymiJPYYpe19rs bbeDlR50Es5A2/QRQ/PqZ79YtGSzKyikuMmyeiylkXpURNXO X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A From: Sumit Semwal LG SW43408 is 1080x2160, 4-lane MIPI-DSI panel, used in some Pixel3 phones. Signed-off-by: Sumit Semwal [vinod: Add DSC support] Signed-off-by: Vinod Koul [caleb: cleanup and support turning off the panel] Signed-off-by: Caleb Connolly [DB: partially rewrote the driver and fixed DSC programming] Signed-off-by: Dmitry Baryshkov --- MAINTAINERS | 8 + drivers/gpu/drm/panel/Kconfig | 11 ++ drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-lg-sw43408.c | 321 +++++++++++++++++++++++++++= ++++ 4 files changed, 341 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4b511a55101c..f4cf7ee97376 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6755,6 +6755,14 @@ S: Maintained F: Documentation/devicetree/bindings/display/panel/jadard,jd9365da-h3.yaml F: drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c =20 +DRM DRIVER FOR LG SW43408 PANELS +M: Sumit Semwal +M: Caleb Connolly +S: Maintained +T: git git://anongit.freedesktop.org/drm/drm-misc +F: Documentation/devicetree/bindings/display/panel/lg,sw43408.yaml +F: drivers/gpu/drm/panel/panel-lg-sw43408.c + DRM DRIVER FOR LOGICVC DISPLAY CONTROLLER M: Paul Kocialkowski S: Supported diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index d037b3b8b999..f94c702735cb 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -335,6 +335,17 @@ config DRM_PANEL_LG_LG4573 Say Y here if you want to enable support for LG4573 RGB panel. To compile this driver as a module, choose M here. =20 +config DRM_PANEL_LG_SW43408 + tristate "LG SW43408 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for LG sw43408 panel. + The panel has a 1080x2160 resolution and uses + 24 bit RGB per pixel. It provides a MIPI DSI interface to + the host and has a built-in LED backlight. + config DRM_PANEL_MAGNACHIP_D53E6EA8966 tristate "Magnachip D53E6EA8966 DSI panel" depends on OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index f156d7fa0bcc..a75687d13caf 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -34,6 +34,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) +=3D panel-l= eadtek-ltk050h3146w.o obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) +=3D panel-leadtek-ltk500hd18= 29.o obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) +=3D panel-lg-lb035q02.o obj-$(CONFIG_DRM_PANEL_LG_LG4573) +=3D panel-lg-lg4573.o +obj-$(CONFIG_DRM_PANEL_LG_SW43408) +=3D panel-lg-sw43408.o obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) +=3D panel-magnachip-d53e6ea= 8966.o obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) +=3D panel-nec-nl8048hl11.o obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) +=3D panel-newvision-nv3051d.o diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/pan= el/panel-lg-sw43408.c new file mode 100644 index 000000000000..6c244b9642f1 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c @@ -0,0 +1,321 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019-2024 Linaro Ltd + * Author: Sumit Semwal + * Dmitry Baryshkov + */ + +#include +#include +#include +#include +#include +#include + +#include