From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Stop frobbing crtc->base.mode
Date: Wed, 30 Oct 2019 15:55:50 +0100 [thread overview]
Message-ID: <2a493957-6a1b-1221-48a1-726e9e26587f@linux.intel.com> (raw)
In-Reply-To: <20191029145526.10308-1-ville.syrjala@linux.intel.com>
Op 29-10-2019 om 15:55 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The core no longer uses drm_crtc_state::mode with atomic drivers,
> so let's stop frobbing it in the driver. For the user mode readout
> we'll just use an on stack mode.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index e56a75c07043..96f76abb2d37 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -14127,9 +14127,6 @@ static void intel_pipe_fastset(const struct intel_crtc_state *old_crtc_state,
> struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->base.crtc);
> struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>
> - /* drm_atomic_helper_update_legacy_modeset_state might not be called. */
> - crtc->base.mode = new_crtc_state->base.mode;
> -
> /*
> * Update pipe size and adjust fitter if needed: the reason for this is
> * that in compute_mode_changes we check the native mode (not the pfit
> @@ -17394,13 +17391,16 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
> struct intel_plane *plane;
> int min_cdclk = 0;
>
> - memset(&crtc->base.mode, 0, sizeof(crtc->base.mode));
> if (crtc_state->base.active) {
> - intel_mode_from_pipe_config(&crtc->base.mode, crtc_state);
> - crtc->base.mode.hdisplay = crtc_state->pipe_src_w;
> - crtc->base.mode.vdisplay = crtc_state->pipe_src_h;
> - intel_mode_from_pipe_config(&crtc_state->base.adjusted_mode, crtc_state);
> - WARN_ON(drm_atomic_set_mode_for_crtc(&crtc_state->base, &crtc->base.mode));
> + struct drm_display_mode mode;
> +
> + intel_mode_from_pipe_config(&crtc_state->base.adjusted_mode,
> + crtc_state);
> +
> + mode = crtc_state->base.adjusted_mode;
> + mode.hdisplay = crtc_state->pipe_src_w;
> + mode.vdisplay = crtc_state->pipe_src_h;
> + WARN_ON(drm_atomic_set_mode_for_crtc(&crtc_state->base, &mode));
>
> /*
> * The initial mode needs to be set in order to keep
Hey,
We used to do this not for the core, but because i915 still used crtc->base.mode in some cases. I guess we no longer do, so this is fine.
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Stop frobbing crtc->base.mode
Date: Wed, 30 Oct 2019 15:55:50 +0100 [thread overview]
Message-ID: <2a493957-6a1b-1221-48a1-726e9e26587f@linux.intel.com> (raw)
Message-ID: <20191030145550.ClWOzAsp4TE4kZhJ_yDHHv7ieDp26Zn0fWFJXQks0Gs@z> (raw)
In-Reply-To: <20191029145526.10308-1-ville.syrjala@linux.intel.com>
Op 29-10-2019 om 15:55 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The core no longer uses drm_crtc_state::mode with atomic drivers,
> so let's stop frobbing it in the driver. For the user mode readout
> we'll just use an on stack mode.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index e56a75c07043..96f76abb2d37 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -14127,9 +14127,6 @@ static void intel_pipe_fastset(const struct intel_crtc_state *old_crtc_state,
> struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->base.crtc);
> struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>
> - /* drm_atomic_helper_update_legacy_modeset_state might not be called. */
> - crtc->base.mode = new_crtc_state->base.mode;
> -
> /*
> * Update pipe size and adjust fitter if needed: the reason for this is
> * that in compute_mode_changes we check the native mode (not the pfit
> @@ -17394,13 +17391,16 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
> struct intel_plane *plane;
> int min_cdclk = 0;
>
> - memset(&crtc->base.mode, 0, sizeof(crtc->base.mode));
> if (crtc_state->base.active) {
> - intel_mode_from_pipe_config(&crtc->base.mode, crtc_state);
> - crtc->base.mode.hdisplay = crtc_state->pipe_src_w;
> - crtc->base.mode.vdisplay = crtc_state->pipe_src_h;
> - intel_mode_from_pipe_config(&crtc_state->base.adjusted_mode, crtc_state);
> - WARN_ON(drm_atomic_set_mode_for_crtc(&crtc_state->base, &crtc->base.mode));
> + struct drm_display_mode mode;
> +
> + intel_mode_from_pipe_config(&crtc_state->base.adjusted_mode,
> + crtc_state);
> +
> + mode = crtc_state->base.adjusted_mode;
> + mode.hdisplay = crtc_state->pipe_src_w;
> + mode.vdisplay = crtc_state->pipe_src_h;
> + WARN_ON(drm_atomic_set_mode_for_crtc(&crtc_state->base, &mode));
>
> /*
> * The initial mode needs to be set in order to keep
Hey,
We used to do this not for the core, but because i915 still used crtc->base.mode in some cases. I guess we no longer do, so this is fine.
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-10-30 14:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 14:55 [PATCH] drm/i915: Stop frobbing crtc->base.mode Ville Syrjala
2019-10-29 14:55 ` [Intel-gfx] " Ville Syrjala
2019-10-29 19:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-10-29 19:25 ` [Intel-gfx] " Patchwork
2019-10-30 13:48 ` ✓ Fi.CI.IGT: " Patchwork
2019-10-30 13:48 ` [Intel-gfx] " Patchwork
2019-10-30 14:55 ` Maarten Lankhorst [this message]
2019-10-30 14:55 ` [Intel-gfx] [PATCH] " Maarten Lankhorst
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=2a493957-6a1b-1221-48a1-726e9e26587f@linux.intel.com \
--to=maarten.lankhorst@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