public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 08/10] drm/i915/dvo: Use intel_de_rmw() for DVO enable/disable
Date: Tue, 22 Nov 2022 14:38:08 +0200	[thread overview]
Message-ID: <87edtvxiz3.fsf@intel.com> (raw)
In-Reply-To: <20221122120825.26338-9-ville.syrjala@linux.intel.com>

On Tue, 22 Nov 2022, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Replace the hand rolled RMW with intel_de_rmw() in the DVO
> port enable/disable functions. Also switch to intel_de_posting_read()
> for the posting read (though maybe it should be just be nuked...).
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

I've got an old series adding intel_de_write_post() and
intel_de_rmw_post() that combine the write and the posting read. Wonder
if I should resurrect that. *shrug*.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dvo.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c
> index a5c464c82e5c..c590a92205f0 100644
> --- a/drivers/gpu/drm/i915/display/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_dvo.c
> @@ -185,11 +185,11 @@ static void intel_disable_dvo(struct intel_atomic_state *state,
>  	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
>  	struct intel_dvo *intel_dvo = enc_to_dvo(encoder);
>  	enum port port = encoder->port;
> -	u32 temp = intel_de_read(i915, DVO(port));
>  
>  	intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, false);
> -	intel_de_write(i915, DVO(port), temp & ~DVO_ENABLE);
> -	intel_de_read(i915, DVO(port));
> +
> +	intel_de_rmw(i915, DVO(port), DVO_ENABLE, 0);
> +	intel_de_posting_read(i915, DVO(port));
>  }
>  
>  static void intel_enable_dvo(struct intel_atomic_state *state,
> @@ -200,14 +200,13 @@ static void intel_enable_dvo(struct intel_atomic_state *state,
>  	struct drm_i915_private *i915 = to_i915(encoder->base.dev);
>  	struct intel_dvo *intel_dvo = enc_to_dvo(encoder);
>  	enum port port = encoder->port;
> -	u32 temp = intel_de_read(i915, DVO(port));
>  
>  	intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev,
>  					 &pipe_config->hw.mode,
>  					 &pipe_config->hw.adjusted_mode);
>  
> -	intel_de_write(i915, DVO(port), temp | DVO_ENABLE);
> -	intel_de_read(i915, DVO(port));
> +	intel_de_rmw(i915, DVO(port), 0, DVO_ENABLE);
> +	intel_de_posting_read(i915, DVO(port));
>  
>  	intel_dvo->dev.dev_ops->dpms(&intel_dvo->dev, true);
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-11-22 12:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 12:08 [Intel-gfx] [PATCH 00/10] drm/i915/dvo: Further DVO fixes/cleanups Ville Syrjala
2022-11-22 12:08 ` [Intel-gfx] [PATCH 01/10] drm/i915/dvo/ch7xxx: Fix suspend/resume Ville Syrjala
2022-11-22 12:31   ` Jani Nikula
2022-11-23 14:52     ` Ville Syrjälä
2022-11-22 12:08 ` [Intel-gfx] [PATCH 02/10] drm/i915/dvo/sil164: Nuke pointless return statements Ville Syrjala
2022-11-22 12:32   ` Jani Nikula
2022-11-22 12:08 ` [Intel-gfx] [PATCH 03/10] drm/i915/dvo/sil164: Fix suspend/resume Ville Syrjala
2022-11-22 12:32   ` Jani Nikula
2022-11-22 12:08 ` [Intel-gfx] [PATCH 04/10] drm/i915/dvo: Parametrize DVO/DVO_SRCDIM registers Ville Syrjala
2022-11-22 12:33   ` Jani Nikula
2022-11-22 12:08 ` [Intel-gfx] [PATCH 05/10] drm/i915/dvo: Define a few more DVO register bits Ville Syrjala
2022-11-22 12:33   ` Jani Nikula
2022-11-22 12:08 ` [Intel-gfx] [PATCH 06/10] drm/i915/dvo: Rename the "active data order" bits Ville Syrjala
2022-11-22 12:33   ` Jani Nikula
2022-11-22 12:08 ` [Intel-gfx] [PATCH 07/10] drm/i915/dvo: Use REG_BIT() & co. for DVO registers Ville Syrjala
2022-11-22 12:35   ` Jani Nikula
2022-11-22 12:36     ` Jani Nikula
2022-11-22 12:08 ` [Intel-gfx] [PATCH 08/10] drm/i915/dvo: Use intel_de_rmw() for DVO enable/disable Ville Syrjala
2022-11-22 12:38   ` Jani Nikula [this message]
2022-11-22 12:08 ` [Intel-gfx] [PATCH 09/10] drm/i915/dvo: Extract intel_dvo_regs.h Ville Syrjala
2022-11-22 12:39   ` Jani Nikula
2022-11-22 12:08 ` [Intel-gfx] [PATCH 10/10] drm/i915/dvo: Log about what was detected on which DVO port Ville Syrjala
2022-11-22 12:39   ` Jani Nikula
2022-11-22 15:55 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dvo: Further DVO fixes/cleanups Patchwork
2022-11-22 15:55 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2022-11-22 16:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-11-23  0:49 ` [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=87edtvxiz3.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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