devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Vinod Polimera <quic_vpolimer@quicinc.com>,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	freedreno@lists.freedesktop.org, devicetree@vger.kernel.org,
	quic_kalyant@quicinc.com, quic_sbillaka@quicinc.com,
	quic_bjorande@quicinc.com, quic_abhinavk@quicinc.com,
	quic_vproddut@quicinc.com, quic_khsieh@quicinc.com,
	dianders@chromium.org, linux-kernel@vger.kernel.org,
	quic_aravindh@quicinc.com, swboyd@chromium.org
Subject: Re: [PATCH v9 08/15] drm/bridge: add psr support for panel bridge callbacks
Date: Thu, 5 Jan 2023 15:16:11 +0200	[thread overview]
Message-ID: <47cd5078-f994-e05a-624c-4e221dc74294@linaro.org> (raw)
In-Reply-To: <Y7bMcLHr79uhfJv2@phenom.ffwll.local>

On 05/01/2023 15:11, Daniel Vetter wrote:
> On Wed, Dec 14, 2022 at 03:35:45PM +0530, Vinod Polimera wrote:
>> This change will handle the psr entry exit cases in the panel
>> bridge atomic callback functions. For example, the panel power
>> should not turn off if the panel is entering psr.
>>
>> Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
>> Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
> 
> I think this is all a nice integration of the sr helpers and bridge stuff
> and makes sense to me. For the 2 bridge patches and the drm core atomic
> patch:
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Thank you! I was looking at the patchset and wondering if anybody from 
drm core can actually review the core bits.

Could you please send all r-b letters, so that we don't loose them when 
applying the patches from patchwork?

> 
>> ---
>>   drivers/gpu/drm/bridge/panel.c | 48 ++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 48 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
>> index 3558cbf..5e77e38 100644
>> --- a/drivers/gpu/drm/bridge/panel.c
>> +++ b/drivers/gpu/drm/bridge/panel.c
>> @@ -113,6 +113,18 @@ static void panel_bridge_atomic_pre_enable(struct drm_bridge *bridge,
>>   				struct drm_bridge_state *old_bridge_state)
>>   {
>>   	struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
>> +	struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
>> +	struct drm_encoder *encoder = bridge->encoder;
>> +	struct drm_crtc *crtc;
>> +	struct drm_crtc_state *old_crtc_state;
>> +
>> +	crtc = drm_atomic_get_new_crtc_for_encoder(atomic_state, encoder);
>> +	if (!crtc)
>> +		return;
>> +
>> +	old_crtc_state = drm_atomic_get_old_crtc_state(atomic_state, crtc);
>> +	if (old_crtc_state && old_crtc_state->self_refresh_active)
>> +		return;
>>   
>>   	drm_panel_prepare(panel_bridge->panel);
>>   }
>> @@ -121,6 +133,18 @@ static void panel_bridge_atomic_enable(struct drm_bridge *bridge,
>>   				struct drm_bridge_state *old_bridge_state)
>>   {
>>   	struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
>> +	struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
>> +	struct drm_encoder *encoder = bridge->encoder;
>> +	struct drm_crtc *crtc;
>> +	struct drm_crtc_state *old_crtc_state;
>> +
>> +	crtc = drm_atomic_get_new_crtc_for_encoder(atomic_state, encoder);
>> +	if (!crtc)
>> +		return;
>> +
>> +	old_crtc_state = drm_atomic_get_old_crtc_state(atomic_state, crtc);
>> +	if (old_crtc_state && old_crtc_state->self_refresh_active)
>> +		return;
>>   
>>   	drm_panel_enable(panel_bridge->panel);
>>   }
>> @@ -129,6 +153,18 @@ static void panel_bridge_atomic_disable(struct drm_bridge *bridge,
>>   				struct drm_bridge_state *old_bridge_state)
>>   {
>>   	struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
>> +	struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
>> +	struct drm_encoder *encoder = bridge->encoder;
>> +	struct drm_crtc *crtc;
>> +	struct drm_crtc_state *new_crtc_state;
>> +
>> +	crtc = drm_atomic_get_old_crtc_for_encoder(atomic_state, encoder);
>> +	if (!crtc)
>> +		return;
>> +
>> +	new_crtc_state = drm_atomic_get_new_crtc_state(atomic_state, crtc);
>> +	if (new_crtc_state && new_crtc_state->self_refresh_active)
>> +		return;
>>   
>>   	drm_panel_disable(panel_bridge->panel);
>>   }
>> @@ -137,6 +173,18 @@ static void panel_bridge_atomic_post_disable(struct drm_bridge *bridge,
>>   				struct drm_bridge_state *old_bridge_state)
>>   {
>>   	struct panel_bridge *panel_bridge = drm_bridge_to_panel_bridge(bridge);
>> +	struct drm_atomic_state *atomic_state = old_bridge_state->base.state;
>> +	struct drm_encoder *encoder = bridge->encoder;
>> +	struct drm_crtc *crtc;
>> +	struct drm_crtc_state *new_crtc_state;
>> +
>> +	crtc = drm_atomic_get_old_crtc_for_encoder(atomic_state, encoder);
>> +	if (!crtc)
>> +		return;
>> +
>> +	new_crtc_state = drm_atomic_get_new_crtc_state(atomic_state, crtc);
>> +	if (new_crtc_state && new_crtc_state->self_refresh_active)
>> +		return;
>>   
>>   	drm_panel_unprepare(panel_bridge->panel);
>>   }
>> -- 
>> 2.7.4
>>
> 

-- 
With best wishes
Dmitry


  reply	other threads:[~2023-01-05 13:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 10:05 [PATCH v9 00/15] Add PSR support for eDP Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 01/15] drm/msm/disp/dpu: clear dpu_assign_crtc and get crtc from connector state instead of dpu_enc Vinod Polimera
2022-12-14 15:34   ` Dmitry Baryshkov
2022-12-21 14:10     ` Vinod Polimera
2022-12-21 19:43       ` Dmitry Baryshkov
2022-12-14 10:05 ` [PATCH v9 02/15] drm: add helper functions to retrieve old and new crtc Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 03/15] drm/msm/dp: use atomic callbacks for DP bridge ops Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 04/15] drm/msm/dp: Add basic PSR support for eDP Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 05/15] drm/msm/dp: use the eDP bridge ops to validate eDP modes Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 06/15] drm/msm/dp: disable self_refresh_aware after entering psr Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 07/15] drm/bridge: use atomic enable/disable callbacks for panel bridge Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 08/15] drm/bridge: add psr support for panel bridge callbacks Vinod Polimera
2023-01-05 13:11   ` Daniel Vetter
2023-01-05 13:16     ` Dmitry Baryshkov [this message]
2022-12-14 10:05 ` [PATCH v9 09/15] drm/msm/disp/dpu: use atomic enable/disable callbacks for encoder functions Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 10/15] drm/msm/disp/dpu: check for crtc enable rather than crtc active to release shared resources Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 11/15] drm/msm/disp/dpu: add PSR support for eDP interface in dpu driver Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 12/15] drm/msm/disp/dpu: get timing engine status from intf status register Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 13/15] drm/msm/disp/dpu: wait for extra vsync till timing engine status is disabled Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 14/15] drm/msm/disp/dpu: reset the datapath after timing engine disable Vinod Polimera
2022-12-14 10:05 ` [PATCH v9 15/15] drm/msm/disp/dpu: clear active interface in the datapath cleanup Vinod Polimera

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=47cd5078-f994-e05a-624c-4e221dc74294@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_aravindh@quicinc.com \
    --cc=quic_bjorande@quicinc.com \
    --cc=quic_kalyant@quicinc.com \
    --cc=quic_khsieh@quicinc.com \
    --cc=quic_sbillaka@quicinc.com \
    --cc=quic_vpolimer@quicinc.com \
    --cc=quic_vproddut@quicinc.com \
    --cc=swboyd@chromium.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).