linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajeev Nandan <rajeevny@codeaurora.org>
To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	freedreno@lists.freedesktop.org, devicetree@vger.kernel.org
Cc: Rajeev Nandan <rajeevny@codeaurora.org>,
	linux-kernel@vger.kernel.org, thierry.reding@gmail.com,
	sam@ravnborg.org, robdclark@gmail.com, dianders@chromium.org,
	lyude@redhat.com, jani.nikula@intel.com, robh@kernel.org,
	laurent.pinchart@ideasonboard.com, a.hajda@samsung.com,
	daniel.thompson@linaro.org, hoegsberg@chromium.org,
	abhinavk@codeaurora.org, seanpaul@chromium.org,
	kalyan_t@codeaurora.org, mkrishn@codeaurora.org,
	lee.jones@linaro.org, jingoohan1@gmail.com,
	linux-fbdev@vger.kernel.org
Subject: [v7 2/5] drm/panel-simple: Support DP AUX backlight
Date: Sat, 19 Jun 2021 16:10:27 +0530	[thread overview]
Message-ID: <1624099230-20899-3-git-send-email-rajeevny@codeaurora.org> (raw)
In-Reply-To: <1624099230-20899-1-git-send-email-rajeevny@codeaurora.org>

If there is no backlight specified in the device tree and the panel
has access to the DP AUX channel then create a DP AUX backlight if
supported by the panel.

Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---

(no changes since v5)

This patch depends on the previous patch (2/5) of this series.

Changes in v4:
- New

Changes in v5:
- Address review comments and move backlight functions to drm_panel.c (Douglas)
- Create and register DP AUX backlight if there is no backlight specified in the
  device tree and panel has the DP AUX channel. (Douglas)
- The new drm_panel_dp_aux_backlight() will do the drm_edp_backlight_supported() check.

 drivers/gpu/drm/panel/panel-simple.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index df6fbd1..26555ec 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -800,6 +800,12 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc,
 	if (err)
 		goto disable_pm_runtime;
 
+	if (!panel->base.backlight && panel->aux) {
+		err = drm_panel_dp_aux_backlight(&panel->base, panel->aux);
+		if (err)
+			goto disable_pm_runtime;
+	}
+
 	drm_panel_add(&panel->base);
 
 	return 0;
-- 
2.7.4


      parent reply	other threads:[~2021-06-19 10:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19 10:40 [v7 0/5] drm: Support basic DPCD backlight in panel-simple and add a new panel ATNA33XC20 Rajeev Nandan
2021-06-19 10:40 ` [v7 1/5] drm/panel: add basic DP AUX backlight support Rajeev Nandan
     [not found]   ` <20210620093141.GA703072@ravnborg.org>
2021-06-21  8:38     ` rajeevny
     [not found]       ` <20210621183828.GA918146@ravnborg.org>
2021-06-22 18:33         ` Doug Anderson
2021-06-23  6:15           ` rajeevny
2021-06-19 10:40 ` Rajeev Nandan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1624099230-20899-3-git-send-email-rajeevny@codeaurora.org \
    --to=rajeevny@codeaurora.org \
    --cc=a.hajda@samsung.com \
    --cc=abhinavk@codeaurora.org \
    --cc=daniel.thompson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hoegsberg@chromium.org \
    --cc=jani.nikula@intel.com \
    --cc=jingoohan1@gmail.com \
    --cc=kalyan_t@codeaurora.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=mkrishn@codeaurora.org \
    --cc=robdclark@gmail.com \
    --cc=robh@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=seanpaul@chromium.org \
    --cc=thierry.reding@gmail.com \
    --subject='Re: [v7 2/5] drm/panel-simple: Support DP AUX backlight' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).