From patchwork Mon Apr 17 14:39:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 84277 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp2111481rwl; Mon, 17 Apr 2023 07:51:31 -0700 (PDT) X-Google-Smtp-Source: AKy350aGSoFcN6NErFVDeYqkEDXzanJuHwEWKu/KuDzAXvvRg9GooSNzWBWWrk22zeYGQe9XH74X X-Received: by 2002:a05:6a00:240b:b0:637:c959:8ea1 with SMTP id z11-20020a056a00240b00b00637c9598ea1mr19997390pfh.22.1681743091205; Mon, 17 Apr 2023 07:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681743091; cv=none; d=google.com; s=arc-20160816; b=cO25ex0i9f2/7FQr1IuIaxPQ6YCHIjyUYZzgvqw+0wr7mwY+uNMi+ZiWhliXoTVadw sls/f/cVxKWUm2Fsl+J4gL6XpEiIJH+IjRUrJVEVvAcChYU/QsClbFUx1CoAxkJBIStp QcylyCXoU8fFboTt0m6f2gcOpO7QncpvRZoiyjX/yZmZtGJC2rYI3aXjwg0obhmjLx6i 4NaI6NeK6C4Anw4A9oospPPG2tAW+G+RDJaAzpIURGf4Pe4ddShVm/Nm2g8GzAV/yLz+ URJ/mROvMQOj1VTB0ekDtFPtWXmy29LSj3t7EMpFhHr/0XbW510wHgCrUhyC5qPLaLLf mZgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=mdXWnGN+qNaKraWMowQcC4c2XYV2qj6ZAg8aQ/wfVg8=; b=zdYwprDkGJ/KZliuhq9CJpYSdGCluIV9WavW1ddnKQTF7/JXjftw123eWuhMZLGCy5 O5bo90NZ6KtagmT4JzIrzkMH6DDD18ZH6R3C+r25pRP6izC76TxgY53TW1dmHaam6kj5 cpDpyg5kEy/v68qGM9XsQpc3m/SBgT7nurhrC1DKJB8t0N3C0+16Hx/E/B7pKVoOteX/ ZWwf7gvrdFqEMRtlgHiymrkRlPCeGW15RuvH8RAIamaakdNm67S76b6dnBdSyRhuTbhO FUfL2mdLNPo3OVn/LUIzqODyjo0HNm5SedG5XKpZSt00qDDOZeb1XxszKQuDljEcLCwR ot2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KE70/DF+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a63ff44000000b00513601ad3cesi11228116pgk.150.2023.04.17.07.51.14; Mon, 17 Apr 2023 07:51:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KE70/DF+"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbjDQOjQ (ORCPT + 99 others); Mon, 17 Apr 2023 10:39:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbjDQOjN (ORCPT ); Mon, 17 Apr 2023 10:39:13 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2168892 for ; Mon, 17 Apr 2023 07:39:12 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2a8c51ba511so6643291fa.1 for ; Mon, 17 Apr 2023 07:39:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681742350; x=1684334350; 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=mdXWnGN+qNaKraWMowQcC4c2XYV2qj6ZAg8aQ/wfVg8=; b=KE70/DF+2q+0fF/nJxKBvmnI7Wmms5EeVkDWdDNxeDaj0ZBUejawCRWxWx4vtZ+hNi BNAltsZoMzIIP6S83V1MS8G8bcXGKjlFxXpefTVQjc/WJeFiyfjIRbf79RxUMy8wob4C rkv1V4bhmS6XQMKd80T99g9JLZMHqsSGIC7DZ0vIAVKE/+my6RtalI2olaYyhqpz8ny7 ZuSaIBP2DAmdNI+lkz5tns1UtGAbmsgu3WRD6Mg13zExIhALtpdbyI+mqZtvnU0BpNBk 57NXLeXzLMes6TWNUn2xbBo9u/TXUsG+xsbqxewCH3LEJP5GRv/+y3BZ3PDNTI9CmwYN dMVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681742350; x=1684334350; 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=mdXWnGN+qNaKraWMowQcC4c2XYV2qj6ZAg8aQ/wfVg8=; b=S6krSDj38VUIREdIHgTQdPCqGW4jkV8zKi2LvxKRRTF3+lENpUUdm350X7g31IF+R7 P2eFVvOlsDDXiRagnCA0qNS4ikxJiiyFCs3poj1+S1pVwxKULS0r8idao4aoP/08YzAT XJGGboHsRLU1/7960GiaH3TUVV0Bh/vT3rzGYlSZkJCwzQJ835adgq4Cdg3gJBmagK2Q gEb3aES2ZgN9xV45qu4gPkwHqhhjlEdfRMVVdxgE+OJaQXUtxJ///pImPa/oiKVHjzbH 4oIHbe4XQw7eS5nX9rDdMB61EwWBttOHl5ZvGlZQ8L50kkCxFFQZK4XG0XO3Yb5dud65 6s3A== X-Gm-Message-State: AAQBX9eIzXZb1wRMthw4kKDoDzLCalHph7Yk0vmled/Ib/4o5/CSnAfv lPlbpm10OR7DsH+lXIr13J6C7w== X-Received: by 2002:ac2:532c:0:b0:4ec:81c7:119a with SMTP id f12-20020ac2532c000000b004ec81c7119amr2299538lfh.3.1681742350540; Mon, 17 Apr 2023 07:39:10 -0700 (PDT) Received: from [192.168.1.101] (abyk99.neoplus.adsl.tpnet.pl. [83.9.30.99]) by smtp.gmail.com with ESMTPSA id 2-20020a2eb282000000b002a76b9e4058sm2235785ljx.43.2023.04.17.07.39.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 07:39:10 -0700 (PDT) From: Konrad Dybcio Date: Mon, 17 Apr 2023 16:39:03 +0200 Subject: [PATCH v3 1/4] dt-bindings: display: panel: nt36523: Add Lenovo J606F panel MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v3-1-bcf9ba4de46f@linaro.org> References: <20230412-topic-lenovopanel-v3-0-bcf9ba4de46f@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v3-0-bcf9ba4de46f@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Linus Walleij , Krzysztof Kozlowski X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681742347; l=1499; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=5bPMRcgvavoc74XIAisYDrKLugQRhZ6brU3zPRYWSG8=; b=8Wd1zOxpgSAgmNNf1jSBv9gwguB/pPBp0P3GyRFUcGuVf4OEOfeSOjuiWZ/h5dCaAGZRurmMd0nI IrUkd+9sBdHvzpkvq0tOp2pG1CVO3hl8uxjejsOk5B1345tRlXh2 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763435443152337031?= X-GMAIL-MSGID: =?utf-8?q?1763435443152337031?= Some Lenovo J606F tablets come with a 2K (2000x1200) 60Hz 11" 5:3 video mode display. Document it and allow rotation while at it (Lenovo mounted it upside down!). Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- .../bindings/display/panel/novatek,nt36523.yaml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml b/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml index 0039561ef04c..5f7e4c486094 100644 --- a/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml +++ b/Documentation/devicetree/bindings/display/panel/novatek,nt36523.yaml @@ -19,11 +19,16 @@ allOf: properties: compatible: - items: - - enum: - - xiaomi,elish-boe-nt36523 - - xiaomi,elish-csot-nt36523 - - const: novatek,nt36523 + oneOf: + - items: + - enum: + - xiaomi,elish-boe-nt36523 + - xiaomi,elish-csot-nt36523 + - const: novatek,nt36523 + - items: + - enum: + - lenovo,j606f-boe-nt36523w + - const: novatek,nt36523w reset-gpios: maxItems: 1 @@ -34,6 +39,7 @@ properties: reg: true ports: true + rotation: true backlight: true required: From patchwork Mon Apr 17 14:39:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 84273 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp2105336rwl; Mon, 17 Apr 2023 07:40:52 -0700 (PDT) X-Google-Smtp-Source: AKy350bufZe37MaeC8DebWoENT+aKM/ZQdf/JmWdvEYDk/H3or07ihhrr3dmCEUuDgoQSHug5Ql3 X-Received: by 2002:a05:6a00:1892:b0:63b:859f:f094 with SMTP id x18-20020a056a00189200b0063b859ff094mr10760383pfh.20.1681742452603; Mon, 17 Apr 2023 07:40:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681742452; cv=none; d=google.com; s=arc-20160816; b=iCOfadGgO5ENuMIyRfLfk1xDVAYEDJ5OHqWge7X1WKxT5RZTt1GQa5j6/dMiozCASX 1kWEdNchMcXUYgctt+3c1g88Ba/KPyv9Hc6609vfz/nO26ftdXEMjZHggljERjNAAR0A MiQpM8pQw7QuR9DEc5iipA/UCrcjbDRw06N5R2VccXw6hoyEfquA17POvz1Rtfn5FqIZ BbaxJHM++KQ9R0QBnq8HFuKFqcZZB86KKPZjH63pNnGFZ60/q3ECuXEXSBvjVQzhsnd7 VPdkMb4i0iN/luyZgJpyKqlfbAGAP/GP0MRy/dVTEfwLVqsL100qErXgroD9GMFPwRZq czTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=8VxPnjG7Ga3tmIOUhMs54Sv+8hbNOJAgCnpbXzAxobQ=; b=V5vxGaYVsYO6vFECHCnCE8R9Pk1NTDRprNcOjdqgbvcM4JVY4ZdxcYlvPucsLuhVKe iRiK7vKb8Sty6/3+7UUP7B1SAABRbrDOfjlJRJlsjVWo2IOdWN1enwUVar3vnttJjh5i MxQc2gTkSiJSHEMwuiTldBPGlcMuYSRNXFuPehts3+dPFuHLDBD5q+QspNECs0ffQ0o0 utBEhS/WGlBZzqi1hgV+D8u5SjBo9D2nGpJCDzSBnIAbHl9/60eEK2my1SzZ5BWr1Hg4 r4ups0+cP2Z7mSaIxEAP9KjniF7aeHBcgVgEEKo/VozL988Cb2ZR8SB22HHx3ClF+bD+ QluA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cWWVykdx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v1-20020a626101000000b006389d389c01si11301049pfb.78.2023.04.17.07.40.37; Mon, 17 Apr 2023 07:40:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cWWVykdx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230361AbjDQOjU (ORCPT + 99 others); Mon, 17 Apr 2023 10:39:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbjDQOjP (ORCPT ); Mon, 17 Apr 2023 10:39:15 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D7AEE47 for ; Mon, 17 Apr 2023 07:39:13 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id l15so2123213ljq.8 for ; Mon, 17 Apr 2023 07:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681742352; x=1684334352; 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=8VxPnjG7Ga3tmIOUhMs54Sv+8hbNOJAgCnpbXzAxobQ=; b=cWWVykdxAAPEOQp1ZbmWCBdekcLthpzNRIBJ0OL9IqxWeOgEwmiJOXokKDa3PtB9t5 krOAF+aYZoK4lP0/5yZLFSEJNcuBWFAvj9ZWKt9kvysGz4Oxh9W3tbNNlTW9IXCp7DUM 2e29F2kkaEKqMWPLQUlAcaZWV7JcRBMGjW1BFJ4JjVtV6Cb84+TIZfSfjrgTiShRjksn 06s3Nu8O6KgxCzAWCapCPLaoHuvW9Xzl0HXKYAsNNObWL/I4RiU72v2f8UWfJ7Qzuj8V J0cWzQ3OFxvB6AVgwL3OQE6oM96zxgcrfFMwfa1yuzRDrtD3hjK986sJ0L7tFmASLV4d lhFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681742352; x=1684334352; 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=8VxPnjG7Ga3tmIOUhMs54Sv+8hbNOJAgCnpbXzAxobQ=; b=h3VV/hY2/c75x/ptJE9EjOxT1aGo9a3WeArARSvr47BBk0K2IwtlFJ+mbkGMNK3aes tWnixCX80hWoPiRSMZxiUFCIlMg029cvQwQLnvrd1BeUfJoKCpdUeLOotpXRCmNwb1BW 7wHwDBZ8fVgjHp9OXz9byyirBUNSK1r8kdY14exW22Vpq80il+PrnhGEzYDVuKAFSkGU iEAACBgIVBk0BkxnJ+mKszPyyicvYAuoQho0SdgLHICDxMZWzTOG4S3ErLR4Ygi8+X+a JP9r3BMiOWcQmtyiJNMnyqcb00cDXhvnfJSKFNxVcZEgYfhE6dSj5GbG2o1/3Ui5q4zT 1SlA== X-Gm-Message-State: AAQBX9elHQmqaTCwaMup2JxwkRLT+armJE0Lp+2e8GDV+vxNGhQuyuxA Z802wR47iBg2hFZThu2js8Fo1g== X-Received: by 2002:a05:651c:c2:b0:299:bb73:fcd4 with SMTP id 2-20020a05651c00c200b00299bb73fcd4mr3707650ljr.7.1681742351770; Mon, 17 Apr 2023 07:39:11 -0700 (PDT) Received: from [192.168.1.101] (abyk99.neoplus.adsl.tpnet.pl. [83.9.30.99]) by smtp.gmail.com with ESMTPSA id 2-20020a2eb282000000b002a76b9e4058sm2235785ljx.43.2023.04.17.07.39.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 07:39:11 -0700 (PDT) From: Konrad Dybcio Date: Mon, 17 Apr 2023 16:39:04 +0200 Subject: [PATCH v3 2/4] drm/panel: nt36523: Add DCS backlight support MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v3-2-bcf9ba4de46f@linaro.org> References: <20230412-topic-lenovopanel-v3-0-bcf9ba4de46f@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v3-0-bcf9ba4de46f@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Linus Walleij X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681742347; l=3553; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=dc/Dvzhn8dlfyxlg6IxeHxMIzNiaOkMG9FE6LJmww9g=; b=iM8VjNqLvv57texCYnh0YJE0n+lyfH7nI3h1sLGMBp5uzmqK5nevK+/zKLyan9hqEhpXADSCCpNY Kr3lrPXxCTakzdTzZCvraHB5JU34qFIOk97eRqpgYUzYMd/GpSel X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763434774065278810?= X-GMAIL-MSGID: =?utf-8?q?1763434774065278810?= This chip supports controlling the backlight via DCS commands, on at least some panels. Add support for doing so. Note this may only concern the NT36523*W* variant. Nobody knows, really, there's no docs. Reviewed-by: Linus Walleij Reviewed-by: Jianhua Lu Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/panel/panel-novatek-nt36523.c | 68 +++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c index d30dbbfb67b1..b0466abae812 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c @@ -5,6 +5,7 @@ * Copyright (c) 2022, 2023 Jianhua Lu */ +#include #include #include #include @@ -53,6 +54,7 @@ struct panel_desc { int (*init_sequence)(struct panel_info *pinfo); bool is_dual_dsi; + bool has_dcs_backlight; }; static inline struct panel_info *to_panel_info(struct drm_panel *panel) @@ -679,6 +681,59 @@ static const struct drm_panel_funcs nt36523_panel_funcs = { .get_modes = nt36523_get_modes, }; +static int nt36523_bl_update_status(struct backlight_device *bl) +{ + struct mipi_dsi_device *dsi = bl_get_data(bl); + u16 brightness = backlight_get_brightness(bl); + int ret; + + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; + + ret = mipi_dsi_dcs_set_display_brightness_large(dsi, brightness); + if (ret < 0) + return ret; + + dsi->mode_flags |= MIPI_DSI_MODE_LPM; + + return 0; +} + +static int nt36523_bl_get_brightness(struct backlight_device *bl) +{ + struct mipi_dsi_device *dsi = bl_get_data(bl); + u16 brightness; + int ret; + + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; + + ret = mipi_dsi_dcs_get_display_brightness_large(dsi, &brightness); + if (ret < 0) + return ret; + + dsi->mode_flags |= MIPI_DSI_MODE_LPM; + + return brightness; +} + +static const struct backlight_ops nt36523_bl_ops = { + .update_status = nt36523_bl_update_status, + .get_brightness = nt36523_bl_get_brightness, +}; + +static struct backlight_device *nt36523_create_backlight(struct mipi_dsi_device *dsi) +{ + struct device *dev = &dsi->dev; + const struct backlight_properties props = { + .type = BACKLIGHT_RAW, + .brightness = 512, + .max_brightness = 4095, + .scale = BACKLIGHT_SCALE_NON_LINEAR, + }; + + return devm_backlight_device_register(dev, dev_name(dev), dev, dsi, + &nt36523_bl_ops, &props); +} + static int nt36523_probe(struct mipi_dsi_device *dsi) { struct device *dev = &dsi->dev; @@ -730,9 +785,16 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) mipi_dsi_set_drvdata(dsi, pinfo); drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI); - ret = drm_panel_of_backlight(&pinfo->panel); - if (ret) - return dev_err_probe(dev, ret, "failed to get backlight\n"); + if (pinfo->desc->has_dcs_backlight) { + pinfo->panel.backlight = nt36523_create_backlight(dsi); + if (IS_ERR(pinfo->panel.backlight)) + return dev_err_probe(dev, PTR_ERR(pinfo->panel.backlight), + "Failed to create backlight\n"); + } else { + ret = drm_panel_of_backlight(&pinfo->panel); + if (ret) + return dev_err_probe(dev, ret, "Failed to get backlight\n"); + } drm_panel_add(&pinfo->panel); From patchwork Mon Apr 17 14:39:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 84278 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp2112785rwl; Mon, 17 Apr 2023 07:54:09 -0700 (PDT) X-Google-Smtp-Source: AKy350amuAZ6xTteVO0CI7h1Xbwb1Q5frWqvoDDzT8Nz1fumxJy2/lpfFi+M/Dx0wLYTtul9QT9o X-Received: by 2002:a17:90a:1b6c:b0:240:95a9:923d with SMTP id q99-20020a17090a1b6c00b0024095a9923dmr13928915pjq.48.1681743248947; Mon, 17 Apr 2023 07:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681743248; cv=none; d=google.com; s=arc-20160816; b=N4hz3erreh078hUuOrQ2PnpzJV/aLxzD4suW9Z6Vuyv8H3M20jYwQdV0VNThidMDp1 SjGf5OM/nRe8vIPVwsmVTnU56MecNdzcuypqGpaSi81L97tHUJ1Kv3CICzdmWwfHyy+f lWkzqVC3Z+McZocFn6zc54k+hTJsp9Ln3j7Xryt56X/AQN7x1Y8TbM8VIZrgtsyx4SGV MXCZNoY0aAl9oEKRtY2q/PlDZirnHv/CCB8eXl5yUxuLCU6t47M2K+PLFGy8IzCAa4zJ OfofIGu1tRqUrEhftywfBIaRMBM5HBJPqkty600ijrYbrqK7oQNx6SBYPVhXxshRCCHE J7gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=vfZDVg8acR2SKXDmnGE2uGGT4RT4YcuN/C99IcV99uQ=; b=LKkHutgEizaR7I0R4T0cJukaySFAPfwQA4eoh/D7b1p8trFI7EHs9jSYJNp28bDzU6 3LWIBaJMEWb9GGn/xxGSu7tY52LhaFvu+jIjvm9bC6RcUFsw50ycpZM45vOkXItsQUXt vL1I8xzzkbjG6pjb5kxeFzczlwqfPOUWyv2cCHOdm6ZOvY/BaTy+HYr1TdoYj/IKQfBX CR3pVMF4+BsaNW0QqjrEbFGpWj4xjv8xJVcFTWAHRBLKDJz0Jd+xV70bPCh6yPnisNY5 5YRqpNqqNhREwVha1Rk7Js2vMU8v10XqOe5tK3jShcLZgsUQhU6yu/7mPyjP3GL5lD4G IwOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wiuTpFK+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l5-20020a17090a408500b002469249ae30si10310505pjg.56.2023.04.17.07.53.53; Mon, 17 Apr 2023 07:54:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wiuTpFK+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229585AbjDQOjX (ORCPT + 99 others); Mon, 17 Apr 2023 10:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbjDQOjQ (ORCPT ); Mon, 17 Apr 2023 10:39:16 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 040BA1720 for ; Mon, 17 Apr 2023 07:39:14 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id z38so10571852ljq.12 for ; Mon, 17 Apr 2023 07:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681742353; x=1684334353; 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=vfZDVg8acR2SKXDmnGE2uGGT4RT4YcuN/C99IcV99uQ=; b=wiuTpFK+nWG3951r1qdKkM3efc1mIO0xc7L3tK1Rs7ECSqy5Wt3rrpaotfOfz5CJDK D41+M3aHs+cUv1SIa4rt/ubzWSAjrOjvIcyk9BT0kOiNmapG9P48KAGxl9av9mwWZQwG /MOMRiqPhsf6EnnkABW1UdHlaOceRhuiti+y7IvtJjruZKUzGA92drD+gUiEAEWUYI41 DV844hjjFtBamUAMbd+JusbFvq4IWI0BfLntwCbxKsuAR0u7LgcxlS6lWUoM/tOZlzgz Jq5lyiu3iUCjpVHOgm+iRDM47+12IxDtAEyARnW06F4PRHz9vZMy5FQQ972O/LbLLm2h WUFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681742353; x=1684334353; 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=vfZDVg8acR2SKXDmnGE2uGGT4RT4YcuN/C99IcV99uQ=; b=Z6oXLJCqD8f/dKNfZbPFrlj14X6Vu0m0GF5BXpgIb96Pq7AJ1IMGm9BdRvIImQYv3V FFCv0r1AD3nYsL5+gKEY++1nbO+aI1tgG91Qu9Ld5m0Pj1JDLo5Tw97OEXlrsq9S5uu6 S9UJwTD/fmaLNQ71bUqCQw2PHbpFOfW+NvxN2vjw9KlSND/iOmjLE6iIa+vO/GuZdd1X y/IFpkWEzr8Jd0VDBNGpY57j42tQbVo5HEeq/LcM+fXhcX8gvkkwOlwv13FmErwmmfuA Ji63zD9zdlEuGXprf5t1SWBZUYzVC8IkRo5btylss59dqCbuYMaedQzjL7ylvFtxzfg/ bwUA== X-Gm-Message-State: AAQBX9fSzo6NUnNz1VJ2TVtwyusxKond0mZ0VQx1Nvjin+Cpa/QHr5uf 8BAV0rW6zKTAVEu8zyiUTHAH4Q== X-Received: by 2002:a2e:b16e:0:b0:2a7:a59c:8ad0 with SMTP id a14-20020a2eb16e000000b002a7a59c8ad0mr4192846ljm.2.1681742353572; Mon, 17 Apr 2023 07:39:13 -0700 (PDT) Received: from [192.168.1.101] (abyk99.neoplus.adsl.tpnet.pl. [83.9.30.99]) by smtp.gmail.com with ESMTPSA id 2-20020a2eb282000000b002a76b9e4058sm2235785ljx.43.2023.04.17.07.39.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 07:39:13 -0700 (PDT) From: Konrad Dybcio Date: Mon, 17 Apr 2023 16:39:05 +0200 Subject: [PATCH v3 3/4] drm/panel: nt36523: Get orientation from OF MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v3-3-bcf9ba4de46f@linaro.org> References: <20230412-topic-lenovopanel-v3-0-bcf9ba4de46f@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v3-0-bcf9ba4de46f@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Linus Walleij X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681742347; l=2068; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=pdWLeHccDvo0CLmZJATdV9aHqMgeBmhMVIeYiCuYKCc=; b=LUrTUaEn8X0twowhoCQRfIeIIMED6UchNvHwT4QrNhD6Vj+l42sWFzkIdE1jAYJGhdjTiiovJuiA fxUs8DR1CFaJIdN88iO7ynlRGQvMKmRLweI9zyKkaTC4X63lPAm7 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763435609152160095?= X-GMAIL-MSGID: =?utf-8?q?1763435609152160095?= Some bright vendors mount their display panels upside down. Add the required pieces to allow for accounting for that. Reviewed-by: Linus Walleij Reviewed-by: Jianhua Lu Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/panel/panel-novatek-nt36523.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c index b0466abae812..2c5712ac3037 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c @@ -31,6 +31,7 @@ struct panel_info { struct drm_panel panel; struct mipi_dsi_device *dsi[2]; const struct panel_desc *desc; + enum drm_panel_orientation orientation; struct gpio_desc *reset_gpio; struct backlight_device *backlight; @@ -674,11 +675,19 @@ static int nt36523_get_modes(struct drm_panel *panel, return pinfo->desc->num_modes; } +static enum drm_panel_orientation nt36523_get_orientation(struct drm_panel *panel) +{ + struct panel_info *pinfo = to_panel_info(panel); + + return pinfo->orientation; +} + static const struct drm_panel_funcs nt36523_panel_funcs = { .disable = nt36523_disable, .prepare = nt36523_prepare, .unprepare = nt36523_unprepare, .get_modes = nt36523_get_modes, + .get_orientation = nt36523_get_orientation, }; static int nt36523_bl_update_status(struct backlight_device *bl) @@ -785,6 +794,12 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) mipi_dsi_set_drvdata(dsi, pinfo); drm_panel_init(&pinfo->panel, dev, &nt36523_panel_funcs, DRM_MODE_CONNECTOR_DSI); + ret = of_drm_get_panel_orientation(dev->of_node, &pinfo->orientation); + if (ret < 0) { + dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret); + return ret; + } + if (pinfo->desc->has_dcs_backlight) { pinfo->panel.backlight = nt36523_create_backlight(dsi); if (IS_ERR(pinfo->panel.backlight)) From patchwork Mon Apr 17 14:39:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 84274 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp2105668rwl; Mon, 17 Apr 2023 07:41:28 -0700 (PDT) X-Google-Smtp-Source: AKy350YS921FNLpiZdIFRRtqF9ivWCW7lRUx/lWdTTuZOSeYsM5fv/jeV+hnSMji8sJIQc+QrBAY X-Received: by 2002:a05:6a21:6da1:b0:ec:7705:2f18 with SMTP id wl33-20020a056a216da100b000ec77052f18mr19231288pzb.27.1681742488443; Mon, 17 Apr 2023 07:41:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681742488; cv=none; d=google.com; s=arc-20160816; b=ScADx5bkt0NsSpxc8xRJ9ZjLuvbIutPtPDlg2nORKl3qMDosfVc84b5J7bUI3sBjUI cgeZbcP4rCHqOE9LGvB5sflEgRjM3ECDC9fmlg0vgkGUwFX4py1HmAeaFlX+4AP6Sb/K xAVjSo0t1ol2qDhIf8jEBPQ5FaGqCjN6wJV5J0EwscDbeMn3zmSB1vSqYs/l40Vs3o2F 2atDaXneASW4dQli1FS5xdtWqxARtxy+1zf+nI+xj1ClXmCCFL2DWxS0Zh28k7nNj+4A Inwhz/WXNsC/ifidsyIgImvGvj4zdSu+aXx0SxHAZoWayt3xQ61BZupIbIV2bwyzrJnI iYOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=EKbG0++H3xbVFVaOPyRrEAbbHRNYZ849A4wa8ugtNII=; b=tOIu0zpP7jIFxGEXifri8MDOIrT4BGQqCytrVPPIk6LoVlFn9nKDjOU9RlNFXnKZmq C88DyY47QydAAkSKvXdn4ChKDNWKOq3Tl470lwUZo9vHYH5D/WbAjF04L/tG+4RE0UfP k0vMJhieGJrSwXlzvMsbc//yVRV7vBSLj0DJ1XcJ3FfILpwUqkzwW6bCoLZWI96tV4pm eg6ITKKg2+Gc/9E62PUwJxaSfgnolukmcn69MiqCaz9bcvW96gjioAgN1AeK88ZT3aFI Oc5QVIwoK3n37RzKdnwT4pzdPPgi9A6cEGbAo3ZWgX+XkCTsyWUwxJh+jLwcxyfBiOOJ Xy5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pN366wTw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu11-20020a17090b388b00b002474701edc0si9368751pjb.188.2023.04.17.07.41.15; Mon, 17 Apr 2023 07:41:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pN366wTw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbjDQOjZ (ORCPT + 99 others); Mon, 17 Apr 2023 10:39:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbjDQOjU (ORCPT ); Mon, 17 Apr 2023 10:39:20 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C628F6E8C for ; Mon, 17 Apr 2023 07:39:16 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id j11so14323246ljq.10 for ; Mon, 17 Apr 2023 07:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681742355; x=1684334355; 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=EKbG0++H3xbVFVaOPyRrEAbbHRNYZ849A4wa8ugtNII=; b=pN366wTwu0+ztQLR0QYrHqKI4hmwEnaED2TGmsjGy4dRQ4fkBakoWiKQmQQnSpwIsv DifBTjk7IRTNrg1QcVCnTzl5Wz2ycTM+Fw9LtwP4SFXD4FzFtVsZQANx7T9sGhJG/gCZ tC1M1ZUnz8HNYpHA8VvUfGzGk538L9kjUSwyh/XwJrVxyfG2W3kVOD7Pz0N6Lb0cEfUj QpkRxlmvbOGnY+bQJ6y5PPo73qdkNV+iqFv41jiEH86AwOTFJ3kQ5Rkx0pu5zssWCxuD BXgnxlRryY220DqHPRUHnuAPsIg3AuOuwJAXt5dRkwdxx0ERshDXU2vH7U2dSbzy2Y5R 1l4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681742355; x=1684334355; 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=EKbG0++H3xbVFVaOPyRrEAbbHRNYZ849A4wa8ugtNII=; b=iQ3uDyidC9JCM+t/wF9FqYFSsxZXNU+CFOUTnAvg2KhvRo30PdVEHrpMZbtLOuhFtX uHT2F4rHnq7+82B4OURVR5oJ9uE3p0cmu21aaOoiuFUO6cXOt2GnTmwbocMNEpYk/huP NSGQf849DTe5nozw90LZiMBT8sdcJ1Z5niN4HwmELs3QouBj+RxOXB3Bgbmkis5iJkPP TBYlk7boPIdq90NVfNo/TCsM4dFt2oOqGnR/jBNv6XCdiTCGaaG6qtgN52x7sntwHrjs oMwaw11mXWy3d2uEJ39dc7eE5sQXPwxzRP66ImRMMF+XUHYWc5s19Umn7+0my69mhLZQ GyaA== X-Gm-Message-State: AAQBX9cBl9hBp4QuWNhztYXhCRReKj7kSfYtMdnCcRn2KrLnR4BtxvhE Md9NzUkW7QvEwCfbq4CoGIRkDw== X-Received: by 2002:a2e:930d:0:b0:2a7:a779:eae4 with SMTP id e13-20020a2e930d000000b002a7a779eae4mr4478436ljh.9.1681742354985; Mon, 17 Apr 2023 07:39:14 -0700 (PDT) Received: from [192.168.1.101] (abyk99.neoplus.adsl.tpnet.pl. [83.9.30.99]) by smtp.gmail.com with ESMTPSA id 2-20020a2eb282000000b002a76b9e4058sm2235785ljx.43.2023.04.17.07.39.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 07:39:14 -0700 (PDT) From: Konrad Dybcio Date: Mon, 17 Apr 2023 16:39:06 +0200 Subject: [PATCH v3 4/4] drm/panel: nt36523: Add Lenovo J606F panel MIME-Version: 1.0 Message-Id: <20230412-topic-lenovopanel-v3-4-bcf9ba4de46f@linaro.org> References: <20230412-topic-lenovopanel-v3-0-bcf9ba4de46f@linaro.org> In-Reply-To: <20230412-topic-lenovopanel-v3-0-bcf9ba4de46f@linaro.org> To: Jianhua Lu , Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Marijn Suijten , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio , Linus Walleij X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681742347; l=22582; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=a+KroKy76h4Z+iWZU936x+V3O3+qF0O8kFg1bcYLy8k=; b=9DtjzXzjSrv/qSfPI3t1hQNOMc2jNtpJL0lr2A4kN6iYBbdLLyFclCrrcs+qpXA5jitq0nH3iKmp q/BS2vq0A14zuokiSc/NW7KU5NvYEVcxIRFY6KpVhVHxMhSEIRU/ X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763434811545044588?= X-GMAIL-MSGID: =?utf-8?q?1763434811545044588?= Some Lenovo J606F tablets come with a 2K (2000x1200) 60Hz 11" 5:3 video mode display. Add support for these panels. Reviewed-by: Linus Walleij Reviewed-by: Jianhua Lu Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/panel/panel-novatek-nt36523.c | 486 ++++++++++++++++++++++++++ 1 file changed, 486 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c index 2c5712ac3037..c3befa7f253d 100644 --- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c +++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c @@ -13,6 +13,8 @@ #include #include +#include