From: "Lankhorst, Maarten" <maarten.lankhorst@intel.com>
To: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Kumar, Mahesh1" <mahesh1.kumar@intel.com>
Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 11/11] drm/i915/bxt: Enable IPC support
Date: Thu, 6 Jul 2017 15:10:37 +0000 [thread overview]
Message-ID: <1499353836.2362.3.camel@intel.com> (raw)
In-Reply-To: <20170705143154.32132-12-mahesh1.kumar@intel.com>
Mahesh Kumar schreef op wo 05-07-2017 om 20:01 [+0530]:
> From: "Kumar, Mahesh" <mahesh1.kumar@intel.com>
>
> This patch adds IPC support for platforms. This patch enables IPC
> only for BXT/KBL platform as for SKL recommendation is to keep it
> disabled.
CFL/CNL missing. ;-)
> IPC (Isochronous Priority Control) is the hardware feature, which
> dynamically controls the memory read priority of Display.
>
> When IPC is enabled, plane read requests are sent at high priority
> until
> filling above the transition watermark, then the requests are sent at
> lower priority until dropping below the level 0 watermark.
> The lower priority requests allow other memory clients to have better
> memory access. When IPC is disabled, all plane read requests are sent
> at
> high priority.
>
> Changes since V1:
> - Remove commandline parameter to disable ipc
> - Address Paulo's comments
> Changes since V2:
> - Address review comments
> - Set ipc_enabled flag
> Changes since V3:
> - move ipc_enabled flag assignment inside intel_ipc_enable function
> Changes since V4:
> - Re-enable IPC after suspend/resume
> Changes since V5:
> - Enable IPC for all gen >=9 except SKL
>
> Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 4 +++-
> drivers/gpu/drm/i915/i915_reg.h | 1 +
> drivers/gpu/drm/i915/intel_display.c | 1 +
> drivers/gpu/drm/i915/intel_drv.h | 1 +
> drivers/gpu/drm/i915/intel_pm.c | 16 ++++++++++++++++
> 5 files changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c
> b/drivers/gpu/drm/i915/i915_drv.c
> index 9167a73f3c69..224e00610581 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1334,7 +1334,7 @@ int i915_driver_load(struct pci_dev *pdev,
> const struct pci_device_id *ent)
>
> intel_runtime_pm_enable(dev_priv);
>
> - dev_priv->ipc_enabled = false;
> + intel_enable_ipc(dev_priv);
>
> if (IS_ENABLED(CONFIG_DRM_I915_DEBUG))
> DRM_INFO("DRM_I915_DEBUG enabled\n");
> @@ -2598,6 +2598,8 @@ static int intel_runtime_resume(struct device
> *kdev)
> if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
> intel_hpd_init(dev_priv);
>
> + intel_enable_ipc(dev_priv);
> +
> enable_rpm_wakeref_asserts(dev_priv);
>
> if (ret)
> diff --git a/drivers/gpu/drm/i915/i915_reg.h
> b/drivers/gpu/drm/i915/i915_reg.h
> index 64cc674b652a..09af90f8cd0a 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -6728,6 +6728,7 @@ enum {
> #define DISP_FBC_WM_DIS (1<<15)
> #define DISP_ARB_CTL2 _MMIO(0x45004)
> #define DISP_DATA_PARTITION_5_6 (1<<6)
> +#define DISP_IPC_ENABLE (1<<3)
> #define DBUF_CTL _MMIO(0x45008)
> #define DBUF_POWER_REQUEST (1<<31)
> #define DBUF_POWER_STATE (1<<30)
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 0648fd74be87..e610b4395dcc 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15723,6 +15723,7 @@ void intel_display_resume(struct drm_device
> *dev)
> if (!ret)
> ret = __intel_display_resume(dev, state, &ctx);
>
> + intel_enable_ipc(dev_priv);
> drm_modeset_drop_locks(&ctx);
> drm_modeset_acquire_fini(&ctx);
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h
> b/drivers/gpu/drm/i915/intel_drv.h
> index d17a32437f07..d90b239bd85d 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -1883,6 +1883,7 @@ bool ilk_disable_lp_wm(struct drm_device *dev);
> int sanitize_rc6_option(struct drm_i915_private *dev_priv, int
> enable_rc6);
> int skl_check_pipe_max_pixel_rate(struct intel_crtc *intel_crtc,
> struct intel_crtc_state *cstate);
> +void intel_enable_ipc(struct drm_i915_private *dev_priv);
> static inline int intel_enable_rc6(void)
> {
> return i915.enable_rc6;
> diff --git a/drivers/gpu/drm/i915/intel_pm.c
> b/drivers/gpu/drm/i915/intel_pm.c
> index ad3b3d758d5c..c18695931d33 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5772,6 +5772,22 @@ void intel_update_watermarks(struct intel_crtc
> *crtc)
> dev_priv->display.update_wm(crtc);
> }
>
> +void intel_enable_ipc(struct drm_i915_private *dev_priv)
> +{
> + u32 val;
> +
> + dev_priv->ipc_enabled = false;
> + if (INTEL_GEN(dev_priv) < 9 || IS_SKYLAKE(dev_priv))
> + return;
> +
> + val = I915_READ(DISP_ARB_CTL2);
> +
> + val |= DISP_IPC_ENABLE;
> +
> + I915_WRITE(DISP_ARB_CTL2, val);
> + dev_priv->ipc_enabled = true;
> +}
> +
> /*
> * Lock protecting IPS related data structures
> */
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-07-06 15:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 14:31 [PATCH 00/11] Fixed16.16 wrapper cleanup & wm optimization Mahesh Kumar
2017-07-05 14:31 ` [PATCH 01/11] drm/i915: take-out common clamping code of fixed16 wrappers Mahesh Kumar
2017-07-14 10:24 ` Jani Nikula
2017-07-05 14:31 ` [PATCH 02/11] drm/i915: Always perform internal fixed16 division in 64 bits Mahesh Kumar
2017-07-05 14:31 ` [PATCH 03/11] drm/i915: cleanup fixed-point wrappers naming Mahesh Kumar
2017-07-05 14:31 ` [PATCH 04/11] drm/i915: Addition wrapper for fixed16.16 operation Mahesh Kumar
2017-07-05 14:31 ` [PATCH 05/11] drm/i915/skl+: WM calculation don't require height Mahesh Kumar
2017-07-05 14:31 ` [PATCH 06/11] drm/i915/skl+: unify cpp value in WM calculation Mahesh Kumar
2017-07-13 15:31 ` Maarten Lankhorst
2017-07-14 10:26 ` Jani Nikula
2017-07-14 10:31 ` Mahesh Kumar
2017-07-05 14:31 ` [PATCH 07/11] drm/i915/skl+: Optimize " Mahesh Kumar
2017-07-05 14:31 ` [PATCH 08/11] drm/i915/gen10: Calculate and enable transition WM Mahesh Kumar
2017-07-05 14:31 ` [PATCH 09/11] drm/i915/glk: IPC linetime watermark workaround for GLK Mahesh Kumar
2017-07-05 14:31 ` [PATCH 10/11] drm/i915/cnl: Extend WM workaround with IPC for CNL Mahesh Kumar
2017-07-05 14:31 ` [PATCH 11/11] drm/i915/bxt: Enable IPC support Mahesh Kumar
2017-07-06 15:10 ` Lankhorst, Maarten [this message]
2017-07-13 10:39 ` [PATCH 11/13] " Mahesh Kumar
2017-07-13 10:48 ` Chris Wilson
2017-07-13 12:02 ` Mahesh Kumar
2017-07-05 15:00 ` ✓ Fi.CI.BAT: success for Fixed16.16 wrapper cleanup & wm optimization (rev4) 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=1499353836.2362.3.camel@intel.com \
--to=maarten.lankhorst@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mahesh1.kumar@intel.com \
--cc=paulo.r.zanoni@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