From: Matt Roper <matthew.d.roper@intel.com>
To: Chi Ding <chix.ding@intel.com>
Cc: yetundex.adebisi@intel.com, isg-gms@eclists.intel.com,
intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 4/6] drm/i915/vlv: Change to use intel_crtc_state instead of base CRTC object
Date: Tue, 14 Jun 2016 14:54:01 -0700 [thread overview]
Message-ID: <20160614215401.GB31785@intel.com> (raw)
In-Reply-To: <1465399364-28512-5-git-send-email-chix.ding@intel.com>
On Wed, Jun 08, 2016 at 05:22:42PM +0200, Chi Ding wrote:
> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> This commit changs some functions to operate on intel_crtc_state rather
> than the base CRTC objects in order to transit to atomic
I'd add a little bit more justification to this message.
The reason we want to do this is to allow future patches to move the
computation steps into the atomic 'check' phase where they'll be
operating on in-flight CRTC states rather than already-committed states.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Chi Ding <chix.ding@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 33f52ae..3fc80f9 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -983,9 +983,10 @@ static uint16_t vlv_compute_wm_level(struct intel_plane *plane,
> return min_t(int, wm, USHRT_MAX);
> }
>
> -static void vlv_compute_fifo(struct intel_crtc *crtc,
> +static void vlv_compute_fifo(struct intel_crtc_state *cstate,
> struct vlv_wm_state *wm_state)
> {
> + struct intel_crtc *crtc = to_intel_crtc(cstate->base.crtc);
> struct drm_device *dev = crtc->base.dev;
> struct intel_plane *plane;
> unsigned int total_rate = 0;
> @@ -1088,8 +1089,9 @@ static void vlv_invert_wms(struct intel_crtc *crtc,
> }
> }
>
> -static int vlv_compute_wm(struct intel_crtc *crtc)
> +static int vlv_compute_wm(struct intel_crtc_state *cstate)
> {
> + struct intel_crtc *crtc = to_intel_crtc(cstate->base.crtc);
> struct drm_device *dev = crtc->base.dev;
> struct vlv_wm_state *wm_state = &crtc->wm_state;
> struct intel_plane *plane;
> @@ -1103,7 +1105,7 @@ static int vlv_compute_wm(struct intel_crtc *crtc)
>
> wm_state->num_active_planes = 0;
>
> - vlv_compute_fifo(crtc, wm_state);
> + vlv_compute_fifo(cstate, wm_state);
>
> if (wm_state->num_active_planes != 1)
> wm_state->cxsr = false;
> @@ -1131,7 +1133,7 @@ static int vlv_compute_wm(struct intel_crtc *crtc)
> DRM_DEBUG_KMS("Requested display configuration "
> "exceeds system watermark limitations\n");
> DRM_DEBUG_KMS("Plane %d.%d: blocks required = %u/%u\n",
> - crtc->pipe,
> + to_intel_crtc(cstate->base.crtc)->pipe,
This change is unnecessary, right? 'crtc' is still initialized to the
same thing at the top of the function.
Matt
> drm_plane_index(&plane->base), wm, max_wm);
> return -EINVAL;
> }
> @@ -1332,7 +1334,7 @@ static void vlv_update_wm(struct drm_crtc *crtc)
> enum pipe pipe = intel_crtc->pipe;
> struct vlv_wm_values wm = {};
>
> - vlv_compute_wm(intel_crtc);
> + vlv_compute_wm(intel_crtc->config);
> vlv_merge_wm(dev, &wm);
>
> if (memcmp(&dev_priv->wm.vlv, &wm, sizeof(wm)) == 0) {
> --
> 1.8.0.1
>
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-06-14 21:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1465399364-28512-1-git-send-email-chix.ding@intel.com>
[not found] ` <1465399364-28512-4-git-send-email-chix.ding@intel.com>
2016-06-14 21:52 ` [isg-gms] [RFC 3/6] drm/i915/vlv: Move fifo_size from intel_plane_wm_parameters to vlv_wm_state Matt Roper
2016-06-15 5:51 ` Maarten Lankhorst
[not found] ` <1465399364-28512-5-git-send-email-chix.ding@intel.com>
2016-06-14 21:54 ` Matt Roper [this message]
[not found] ` <1465399364-28512-6-git-send-email-chix.ding@intel.com>
2016-06-14 21:55 ` [isg-gms] [RFC 5/6] drm/i915/vlv: Add optimal field in intel_crtc_wm_state Matt Roper
[not found] ` <1465399364-28512-7-git-send-email-chix.ding@intel.com>
[not found] ` <188f04b1-8972-d387-cf85-dfb526fa86d3@linux.intel.com>
[not found] ` <FBBD98403E9C0B4AA00BFB8657163F851A476D2F@IRSMSX108.ger.corp.intel.com>
[not found] ` <a2330aee-89e4-8f92-5a6b-c9cda52bd494@linux.intel.com>
[not found] ` <FBBD98403E9C0B4AA00BFB8657163F851A476F0D@IRSMSX108.ger.corp.intel.com>
2016-06-14 22:57 ` [RFC 6/6] drm/i915/vlv: Add intermediate field in intel_crtc_wm_state and handlers for two-level watermark Matt Roper
2016-06-15 9:49 ` Ville Syrjälä
2016-06-16 11:01 ` Ding, ChiX
2016-07-06 14:05 ` Ville Syrjälä
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=20160614215401.GB31785@intel.com \
--to=matthew.d.roper@intel.com \
--cc=chix.ding@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=isg-gms@eclists.intel.com \
--cc=yetundex.adebisi@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