All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Arun R Murthy <arun.r.murthy@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/6] drm/i915/display: global histogram restrictions
Date: Tue, 23 May 2023 13:12:39 +0300	[thread overview]
Message-ID: <87y1lfl5k8.fsf@intel.com> (raw)
In-Reply-To: <20230518094916.1142812-3-arun.r.murthy@intel.com>

On Thu, 18 May 2023, Arun R Murthy <arun.r.murthy@intel.com> wrote:
> For global histogram the panel should be edp and should have pwm based
> backlight controller. Flags are updated accordingly.
>
> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_modeset_setup.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> index cd21b0ddbabb..975d6bdb59f3 100644
> --- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> +++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> @@ -17,12 +17,14 @@
>  #include "intel_crtc_state_dump.h"
>  #include "intel_ddi.h"
>  #include "intel_de.h"
> +#include "intel_dp.h"
>  #include "intel_display.h"
>  #include "intel_display_power.h"
>  #include "intel_display_types.h"
>  #include "intel_modeset_setup.h"
>  #include "intel_pch_display.h"
>  #include "intel_pm.h"
> +#include "intel_global_hist.h"
>  
>  static void intel_crtc_disable_noatomic(struct intel_crtc *crtc,
>  					struct drm_modeset_acquire_ctx *ctx)
> @@ -309,6 +311,7 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
>  	struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc);
>  	struct intel_crtc_state *crtc_state = crtc ?
>  		to_intel_crtc_state(crtc->base.state) : NULL;
> +	struct intel_panel *panel;
>  
>  	/*
>  	 * We need to check both for a crtc link (meaning that the encoder is
> @@ -376,6 +379,15 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
>  
>  	if (HAS_DDI(i915))
>  		intel_ddi_sanitize_encoder_pll_mapping(encoder);
> +
> +	/* validate the global hist struct elements */
> +	if (intel_dp_is_port_edp(i915, encoder->port)) {
> +		crtc->global_hist->has_edp = true;
> +		panel = &connector->panel;
> +		if (panel->backlight.present == true)
> +			crtc->global_hist->has_pwm = true;
> +	}

Again, the dependency on eDP and backlight is unnecessary policy.

Side note, backlight being present doesn't mean "has pwm". It could be
some other kind of backlight as well.

BR,
Jani.

> +
>  }
>  
>  /* FIXME read out full plane state for all planes */

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-05-23 10:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18  9:49 [Intel-gfx] [PATCH 1/6] drm/i915/display: Add support for global histogram Arun R Murthy
2023-05-18  9:49 ` [Intel-gfx] [PATCH 2/6] drm/i915/display: global histogram irq handler Arun R Murthy
2023-05-23 10:10   ` Jani Nikula
2023-05-18  9:49 ` [Intel-gfx] [PATCH 3/6] drm/i915/display: global histogram restrictions Arun R Murthy
2023-05-23 10:12   ` Jani Nikula [this message]
2023-05-18  9:49 ` [Intel-gfx] [PATCH 4/6] drm/i915/display: Add crtc properties for global histogram Arun R Murthy
2023-05-18  9:49 ` [Intel-gfx] [PATCH 5/6] drm/i915/display: crtc property for global hist selective fetch Arun R Murthy
2023-05-18  9:49 ` [Intel-gfx] [PATCH 6/6] drm/i915/display: Enable global hist Selective fetch Arun R Murthy
2023-05-18 10:13 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/6] drm/i915/display: Add support for global histogram Patchwork
2023-05-23 10:09 ` [Intel-gfx] [PATCH 1/6] " Jani Nikula
2023-06-20  8:44   ` Murthy, Arun R

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=87y1lfl5k8.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.