From: Rodrigo Vivi <rodrigo.vivi@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 9/9] drm/i915: Enable pipe gamma for sprites
Date: Mon, 18 Nov 2013 18:32:38 -0800 [thread overview]
Message-ID: <1384828358-31563-10-git-send-email-rodrigo.vivi@gmail.com> (raw)
In-Reply-To: <1384828358-31563-1-git-send-email-rodrigo.vivi@gmail.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
We send the primary and cursor plane data through the gamma unit.
In order to get matching output from sprites, also send the sprite
data through the gamma unit.
In the future we should add some properties to control this
explicitly, and also add properties for the per-sprite gamma ramps
what have you, but for now this seems like a reasonable thing to do.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
---
drivers/gpu/drm/i915/i915_reg.h | 2 +-
drivers/gpu/drm/i915/intel_sprite.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 8f4916d..7b454d2 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3745,7 +3745,7 @@
#define _SPACNTR (VLV_DISPLAY_BASE + 0x72180)
#define SP_ENABLE (1<<31)
-#define SP_GEAMMA_ENABLE (1<<30)
+#define SP_GAMMA_ENABLE (1<<30)
#define SP_PIXFORMAT_MASK (0xf<<26)
#define SP_FORMAT_YUV422 (0<<26)
#define SP_FORMAT_BGR565 (5<<26)
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 8afaad6..cb7ffd3 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -104,6 +104,12 @@ vlv_update_plane(struct drm_plane *dplane, struct drm_crtc *crtc,
break;
}
+ /*
+ * Enable gamma to match primary/cursor plane behaviour.
+ * FIXME should be user controllable via propertiesa.
+ */
+ sprctl |= SP_GAMMA_ENABLE;
+
if (obj->tiling_mode != I915_TILING_NONE)
sprctl |= SP_TILED;
@@ -257,6 +263,12 @@ ivb_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
BUG();
}
+ /*
+ * Enable gamma to match primary/cursor plane behaviour.
+ * FIXME should be user controllable via propertiesa.
+ */
+ sprctl |= SPRITE_GAMMA_ENABLE;
+
if (obj->tiling_mode != I915_TILING_NONE)
sprctl |= SPRITE_TILED;
@@ -453,6 +465,12 @@ ilk_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
BUG();
}
+ /*
+ * Enable gamma to match primary/cursor plane behaviour.
+ * FIXME should be user controllable via propertiesa.
+ */
+ dvscntr |= DVS_GAMMA_ENABLE;
+
if (obj->tiling_mode != I915_TILING_NONE)
dvscntr |= DVS_TILED;
--
1.8.3.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-11-19 2:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 2:32 [PATCH 0/9] drm-intel-collector - update Rodrigo Vivi
2013-11-19 2:32 ` [PATCH 1/9] drm/i915: Asynchronously perform the set-base for a simple modeset Rodrigo Vivi
2013-11-19 2:32 ` [PATCH 2/9] drm/i915: Fix gen3/4 vblank counter wraparound Rodrigo Vivi
2013-11-19 13:51 ` Chris Wilson
2013-11-19 2:32 ` [PATCH 3/9] drm/i915: Use frame counter for intel_wait_for_vblank() on CTG Rodrigo Vivi
2013-11-19 13:46 ` Chris Wilson
2013-11-19 16:38 ` Daniel Vetter
2013-11-19 17:26 ` Rodrigo Vivi
2013-11-19 2:32 ` [PATCH 4/9] drm/i915: Do hw quiescing first during unload Rodrigo Vivi
2013-11-19 17:43 ` Rodrigo Vivi
2013-11-19 2:32 ` [PATCH 5/9] drm/i915: print object bindings in debugfs Rodrigo Vivi
2013-11-19 13:52 ` Chris Wilson
2013-11-19 17:37 ` Rodrigo Vivi
2013-11-20 11:03 ` Chris Wilson
2013-11-20 16:52 ` Rodrigo Vivi
2013-11-19 2:32 ` [PATCH 6/9] drm/i915/vlv: enable HDMI audio for Valleyview2 Rodrigo Vivi
2013-11-19 2:32 ` [PATCH 7/9] drm/i915: Hold pc8 lock around toggling pc8.gpu_idle Rodrigo Vivi
2013-11-19 2:32 ` [PATCH 8/9] drm/i915: Do not enable package C8 on unsupported hardware Rodrigo Vivi
2013-11-19 12:02 ` Daniel Vetter
2013-11-19 2:32 ` Rodrigo Vivi [this message]
2013-11-19 17:42 ` [PATCH 9/9] drm/i915: Enable pipe gamma for sprites Rodrigo Vivi
2013-11-21 8:10 ` Daniel Vetter
2013-11-19 2:35 ` [PATCH 0/9] drm-intel-collector - update Rodrigo Vivi
2013-11-19 3:28 ` Ausmus, James
2013-11-19 17:25 ` Rodrigo Vivi
2013-11-19 17:44 ` Rodrigo Vivi
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=1384828358-31563-10-git-send-email-rodrigo.vivi@gmail.com \
--to=rodrigo.vivi@gmail.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