Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v2 3/6] drm/i915/lspcon: change signature of lspcon_detect_hdr_capability()
Date: Tue, 4 Feb 2025 17:57:05 -0500	[thread overview]
Message-ID: <Z6KbQZXAVwBzy6NZ@intel.com> (raw)
In-Reply-To: <6f249f5c537a16a6762faddffd6a95cbf61cf077.1738677489.git.jani.nikula@intel.com>

On Tue, Feb 04, 2025 at 03:58:40PM +0200, Jani Nikula wrote:
> Switch from struct intel_lspcon to struct intel_digital_port to unify,
> and return the value so the caller doesn't have to look at
> lspcon->hdr_detected directly.


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

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c     | 4 +---
>  drivers/gpu/drm/i915/display/intel_lspcon.c | 5 ++++-
>  drivers/gpu/drm/i915/display/intel_lspcon.h | 2 +-
>  3 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index ef182ef574f7..2db7741c25bd 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5844,7 +5844,6 @@ intel_dp_connector_register(struct drm_connector *connector)
>  	struct intel_display *display = to_intel_display(connector->dev);
>  	struct intel_dp *intel_dp = intel_attached_dp(to_intel_connector(connector));
>  	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> -	struct intel_lspcon *lspcon = &dig_port->lspcon;
>  	int ret;
>  
>  	ret = intel_connector_register(connector);
> @@ -5867,8 +5866,7 @@ intel_dp_connector_register(struct drm_connector *connector)
>  	 * efficiently and streamlined.
>  	 */
>  	if (lspcon_init(dig_port)) {
> -		lspcon_detect_hdr_capability(lspcon);
> -		if (lspcon->hdr_supported)
> +		if (lspcon_detect_hdr_capability(dig_port))
>  			drm_connector_attach_hdr_output_metadata_property(connector);
>  	}
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.c b/drivers/gpu/drm/i915/display/intel_lspcon.c
> index e54aad8a5f7f..2dd2b700b0f3 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
> @@ -121,8 +121,9 @@ static u32 get_hdr_status_reg(struct intel_lspcon *lspcon)
>  		return DPCD_PARADE_LSPCON_HDR_STATUS;
>  }
>  
> -void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon)
> +bool lspcon_detect_hdr_capability(struct intel_digital_port *dig_port)
>  {
> +	struct intel_lspcon *lspcon = &dig_port->lspcon;
>  	struct intel_dp *intel_dp = lspcon_to_intel_dp(lspcon);
>  	struct intel_display *display = to_intel_display(intel_dp);
>  	u8 hdr_caps;
> @@ -138,6 +139,8 @@ void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon)
>  		drm_dbg_kms(display->drm, "LSPCON capable of HDR\n");
>  		lspcon->hdr_supported = true;
>  	}
> +
> +	return lspcon->hdr_supported;
>  }
>  
>  static enum drm_lspcon_mode lspcon_get_current_mode(struct intel_lspcon *lspcon)
> diff --git a/drivers/gpu/drm/i915/display/intel_lspcon.h b/drivers/gpu/drm/i915/display/intel_lspcon.h
> index 4c8ba3ddbac4..18cc15e5221d 100644
> --- a/drivers/gpu/drm/i915/display/intel_lspcon.h
> +++ b/drivers/gpu/drm/i915/display/intel_lspcon.h
> @@ -17,7 +17,7 @@ struct intel_lspcon;
>  
>  bool lspcon_init(struct intel_digital_port *dig_port);
>  bool intel_lspcon_active(struct intel_digital_port *dig_port);
> -void lspcon_detect_hdr_capability(struct intel_lspcon *lspcon);
> +bool lspcon_detect_hdr_capability(struct intel_digital_port *dig_port);
>  void lspcon_resume(struct intel_digital_port *dig_port);
>  void lspcon_wait_pcon_mode(struct intel_lspcon *lspcon);
>  void lspcon_write_infoframe(struct intel_encoder *encoder,
> -- 
> 2.39.5
> 

  reply	other threads:[~2025-02-04 22:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04 13:58 [PATCH v2 0/6] drm/i915/lspcon: interface cleanups Jani Nikula
2025-02-04 13:58 ` [PATCH v2 1/6] drm/i915/hdmi: move declarations for hsw_read/write_infoframe() to the right place Jani Nikula
2025-02-04 22:55   ` Rodrigo Vivi
2025-02-04 13:58 ` [PATCH v2 2/6] drm/i915/lspcon: add intel_lspcon_active() and use it Jani Nikula
2025-02-04 22:55   ` Rodrigo Vivi
2025-02-04 13:58 ` [PATCH v2 3/6] drm/i915/lspcon: change signature of lspcon_detect_hdr_capability() Jani Nikula
2025-02-04 22:57   ` Rodrigo Vivi [this message]
2025-02-04 13:58 ` [PATCH v2 4/6] drm/i915/lspcon: change signature of lspcon_wait_pcon_mode() Jani Nikula
2025-02-04 22:58   ` Rodrigo Vivi
2025-02-05 17:53     ` Jani Nikula
2025-02-04 13:58 ` [PATCH v2 5/6] drm/i915/lspcon: remove dp_to_lspcon(), hide enc_to_intel_lspcon() Jani Nikula
2025-02-04 22:59   ` Rodrigo Vivi
2025-02-04 13:58 ` [PATCH v2 6/6] drm/i915/lspcon: rename interfaces to intel_lspcon_* to unify Jani Nikula
2025-02-04 22:59   ` Rodrigo Vivi
2025-02-04 17:48 ` ✓ CI.Patch_applied: success for drm/i915/lspcon: interface cleanups Patchwork
2025-02-04 17:48 ` ✓ CI.checkpatch: " Patchwork
2025-02-04 17:49 ` ✓ CI.KUnit: " Patchwork
2025-02-04 18:06 ` ✓ CI.Build: " Patchwork
2025-02-04 18:08 ` ✓ CI.Hooks: " Patchwork
2025-02-04 18:09 ` ✗ CI.checksparse: warning " Patchwork
2025-02-04 18:31 ` ✓ Xe.CI.BAT: success " Patchwork
2025-02-04 21:55 ` ✗ Xe.CI.Full: failure " 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=Z6KbQZXAVwBzy6NZ@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.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