From: Damien Lespiau <damien.lespiau@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/5] drm/i915: Make num_sprites a per-pipe value
Date: Mon, 3 Mar 2014 17:31:48 +0000 [thread overview]
Message-ID: <1393867908-4604-6-git-send-email-damien.lespiau@intel.com> (raw)
In-Reply-To: <1393867908-4604-1-git-send-email-damien.lespiau@intel.com>
In the future, we need to be able to specify per-pipe number of
planes/sprites. Let's start today!
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
drivers/gpu/drm/i915/i915_dma.c | 8 ++++++--
drivers/gpu/drm/i915/i915_drv.h | 6 +++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 7688abc..899f2ae 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1480,12 +1480,16 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_device_info *info;
+ enum pipe pipe;
info = (struct intel_device_info *)&dev_priv->info;
- info->num_sprites = 1;
if (IS_VALLEYVIEW(dev))
- info->num_sprites = 2;
+ for_each_pipe(pipe)
+ info->num_sprites[pipe] = 2;
+ else
+ for_each_pipe(pipe)
+ info->num_sprites[pipe] = 1;
if (i915.disable_display) {
DRM_INFO("Display disabled (module parameter)\n");
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index ad51a0e..7cd0941 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -79,7 +79,7 @@ enum plane {
};
#define plane_name(p) ((p) + 'A')
-#define sprite_name(p, s) ((p) * INTEL_INFO(dev)->num_sprites + (s) + 'A')
+#define sprite_name(p, s) ((p) * INTEL_INFO(dev)->num_sprites[(p)] + (s) + 'A')
enum port {
PORT_A = 0,
@@ -159,7 +159,7 @@ enum hpd_pin {
I915_GEM_DOMAIN_VERTEX)
#define for_each_pipe(p) for ((p) = 0; (p) < INTEL_INFO(dev)->num_pipes; (p)++)
-#define for_each_sprite(p, s) for ((s) = 0; (s) < INTEL_INFO(dev)->num_sprites; (s)++)
+#define for_each_sprite(p, s) for ((s) = 0; (s) < INTEL_INFO(dev)->num_sprites[(p)]; (s)++)
#define for_each_encoder_on_crtc(dev, __crtc, intel_encoder) \
list_for_each_entry((intel_encoder), &(dev)->mode_config.encoder_list, base.head) \
@@ -535,7 +535,7 @@ struct intel_uncore {
struct intel_device_info {
u32 display_mmio_offset;
u8 num_pipes:3;
- u8 num_sprites:2;
+ u8 num_sprites[I915_MAX_PIPES];
u8 gen;
u8 ring_mask; /* Rings supported by the HW */
DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG, SEP_SEMICOLON);
--
1.8.3.1
next prev parent reply other threads:[~2014-03-03 17:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-03 17:31 [PATCH 0/5] Make num_sprites a per pipe value (v3) Damien Lespiau
2014-03-03 17:31 ` [PATCH 1/5] drm/i915: Use a pipe variable to cycle through the pipes Damien Lespiau
2014-03-03 17:31 ` [PATCH 2/5] drm/i915: Don't declare unnecessary shadowing variable Damien Lespiau
2014-03-03 17:31 ` [PATCH 3/5] drm/i915: Replace a few for_each_pipe(i) by for_each_pipe(pipe) Damien Lespiau
2014-03-03 17:31 ` [PATCH 4/5] drm/i915: Add a for_each_sprite() macro Damien Lespiau
2014-03-03 17:31 ` Damien Lespiau [this message]
2014-03-03 21:16 ` [PATCH 0/5] Make num_sprites a per pipe value (v3) Chris Wilson
2014-03-05 17:48 ` Daniel Vetter
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=1393867908-4604-6-git-send-email-damien.lespiau@intel.com \
--to=damien.lespiau@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox