Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Lyude Paul <lyude@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>, David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org,
	open list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	Wambui Karuga <wambui.karugax@gmail.com>
Subject: Re: [Intel-gfx] [RFC 2/5] drm/i915: Rename pwm_* backlight callbacks to ext_pwm_*
Date: Tue, 15 Sep 2020 15:08:03 -0400	[thread overview]
Message-ID: <20200915190803.GD503362@intel.com> (raw)
In-Reply-To: <20200915172939.2810538-3-lyude@redhat.com>

On Tue, Sep 15, 2020 at 01:29:36PM -0400, Lyude Paul wrote:
> Since we're going to need to add a set of lower-level PWM backlight
> control hooks to be shared by normal backlight controls and HDR
> backlight controls in SDR mode, let's add a prefix to the external PWM
> backlight functions so that the difference between them and the high
> level PWM-only backlight functions is a bit more obvious.

it looks like a good idea to me:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> This introduces no functional changes.
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: thaytan@noraisin.net
> Cc: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
>  drivers/gpu/drm/i915/display/intel_panel.c | 24 +++++++++++-----------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_panel.c b/drivers/gpu/drm/i915/display/intel_panel.c
> index 9f23bac0d7924..c0e36244bb07d 100644
> --- a/drivers/gpu/drm/i915/display/intel_panel.c
> +++ b/drivers/gpu/drm/i915/display/intel_panel.c
> @@ -589,7 +589,7 @@ static u32 bxt_get_backlight(struct intel_connector *connector)
>  			     BXT_BLC_PWM_DUTY(panel->backlight.controller));
>  }
>  
> -static u32 pwm_get_backlight(struct intel_connector *connector)
> +static u32 ext_pwm_get_backlight(struct intel_connector *connector)
>  {
>  	struct intel_panel *panel = &connector->panel;
>  	struct pwm_state state;
> @@ -666,7 +666,7 @@ static void bxt_set_backlight(const struct drm_connector_state *conn_state, u32
>  		       BXT_BLC_PWM_DUTY(panel->backlight.controller), level);
>  }
>  
> -static void pwm_set_backlight(const struct drm_connector_state *conn_state, u32 level)
> +static void ext_pwm_set_backlight(const struct drm_connector_state *conn_state, u32 level)
>  {
>  	struct intel_panel *panel = &to_intel_connector(conn_state->connector)->panel;
>  
> @@ -835,7 +835,7 @@ static void cnp_disable_backlight(const struct drm_connector_state *old_conn_sta
>  		       tmp & ~BXT_BLC_PWM_ENABLE);
>  }
>  
> -static void pwm_disable_backlight(const struct drm_connector_state *old_conn_state)
> +static void ext_pwm_disable_backlight(const struct drm_connector_state *old_conn_state)
>  {
>  	struct intel_connector *connector = to_intel_connector(old_conn_state->connector);
>  	struct intel_panel *panel = &connector->panel;
> @@ -1168,8 +1168,8 @@ static void cnp_enable_backlight(const struct intel_crtc_state *crtc_state,
>  		       pwm_ctl | BXT_BLC_PWM_ENABLE);
>  }
>  
> -static void pwm_enable_backlight(const struct intel_crtc_state *crtc_state,
> -				 const struct drm_connector_state *conn_state)
> +static void ext_pwm_enable_backlight(const struct intel_crtc_state *crtc_state,
> +				     const struct drm_connector_state *conn_state)
>  {
>  	struct intel_connector *connector = to_intel_connector(conn_state->connector);
>  	struct intel_panel *panel = &connector->panel;
> @@ -1890,8 +1890,8 @@ cnp_setup_backlight(struct intel_connector *connector, enum pipe unused)
>  	return 0;
>  }
>  
> -static int pwm_setup_backlight(struct intel_connector *connector,
> -			       enum pipe pipe)
> +static int ext_pwm_setup_backlight(struct intel_connector *connector,
> +				   enum pipe pipe)
>  {
>  	struct drm_device *dev = connector->base.dev;
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> @@ -2065,11 +2065,11 @@ intel_panel_init_backlight_funcs(struct intel_panel *panel)
>  		panel->backlight.hz_to_pwm = pch_hz_to_pwm;
>  	} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
>  		if (connector->base.connector_type == DRM_MODE_CONNECTOR_DSI) {
> -			panel->backlight.setup = pwm_setup_backlight;
> -			panel->backlight.enable = pwm_enable_backlight;
> -			panel->backlight.disable = pwm_disable_backlight;
> -			panel->backlight.set = pwm_set_backlight;
> -			panel->backlight.get = pwm_get_backlight;
> +			panel->backlight.setup = ext_pwm_setup_backlight;
> +			panel->backlight.enable = ext_pwm_enable_backlight;
> +			panel->backlight.disable = ext_pwm_disable_backlight;
> +			panel->backlight.set = ext_pwm_set_backlight;
> +			panel->backlight.get = ext_pwm_get_backlight;
>  		} else {
>  			panel->backlight.setup = vlv_setup_backlight;
>  			panel->backlight.enable = vlv_enable_backlight;
> -- 
> 2.26.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-09-15 19:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 17:29 [Intel-gfx] [RFC 0/5] drm/i915: Add support for Intel's eDP backlight controls Lyude Paul
2020-09-15 17:29 ` [Intel-gfx] [RFC 1/5] drm/i915/dp: Program source OUI on eDP panels Lyude Paul
2020-09-15 19:06   ` Rodrigo Vivi
2020-09-15 19:47     ` Lyude Paul
2020-09-15 22:38       ` Navare, Manasi
2020-09-16  0:05         ` Lyude Paul
2020-09-16  7:43     ` Jani Nikula
2020-09-16 15:32       ` Lyude Paul
2020-09-15 17:29 ` [Intel-gfx] [RFC 2/5] drm/i915: Rename pwm_* backlight callbacks to ext_pwm_* Lyude Paul
2020-09-15 19:08   ` Rodrigo Vivi [this message]
2020-09-15 17:29 ` [Intel-gfx] [RFC 3/5] drm/i915: Keep track of pwm-related backlight hooks separately Lyude Paul
2020-09-15 17:29 ` [Intel-gfx] [RFC 4/5] drm/i915: Enable Intel's HDR backlight interface (only SDR for now) Lyude Paul
2020-09-15 19:21   ` Rodrigo Vivi
2020-09-15 17:29 ` [Intel-gfx] [RFC 5/5] drm/dp: Revert "drm/dp: Introduce EDID-based quirks" Lyude Paul
2020-09-16  7:00   ` Jani Nikula
2020-09-15 17:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add support for Intel's eDP backlight controls Patchwork
2020-09-15 18:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-09-15 21:58 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=20200915190803.GD503362@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=airlied@linux.ie \
    --cc=anarsoul@gmail.com \
    --cc=arnd@arndb.de \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=wambui.karugax@gmail.com \
    /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