* [PATCH 1/1] drm/i915: add a LLC feature flag in device description
@ 2012-01-17 16:43 Eugeni Dodonov
2012-01-17 17:31 ` Eric Anholt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eugeni Dodonov @ 2012-01-17 16:43 UTC (permalink / raw)
To: intel-gfx; +Cc: Eugeni Dodonov
LLC is not SNB/IVB-specific, so we should check for it in a more generic
way.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 1 +
drivers/gpu/drm/i915/i915_dma.c | 3 +++
drivers/gpu/drm/i915/i915_drv.c | 4 ++++
drivers/gpu/drm/i915/i915_drv.h | 2 ++
drivers/gpu/drm/i915/i915_gem.c | 4 ++--
include/drm/i915_drm.h | 1 +
6 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 1180798..6c3be86 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -83,6 +83,7 @@ static int i915_capabilities(struct seq_file *m, void *data)
B(supports_tv);
B(has_bsd_ring);
B(has_blt_ring);
+ B(has_llc);
#undef B
return 0;
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 5f4d589..01985e0 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -784,6 +784,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
case I915_PARAM_HAS_GEN7_SOL_RESET:
value = 1;
break;
+ case I915_PARAM_HAS_LLC:
+ value = HAS_LLC(dev);
+ break;
default:
DRM_DEBUG_DRIVER("Unknown parameter %d\n",
param->param);
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7578c08..1658cfd 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -214,6 +214,7 @@ static const struct intel_device_info intel_sandybridge_d_info = {
.need_gfx_hws = 1, .has_hotplug = 1,
.has_bsd_ring = 1,
.has_blt_ring = 1,
+ .has_llc = 1,
};
static const struct intel_device_info intel_sandybridge_m_info = {
@@ -222,6 +223,7 @@ static const struct intel_device_info intel_sandybridge_m_info = {
.has_fbc = 1,
.has_bsd_ring = 1,
.has_blt_ring = 1,
+ .has_llc = 1,
};
static const struct intel_device_info intel_ivybridge_d_info = {
@@ -229,6 +231,7 @@ static const struct intel_device_info intel_ivybridge_d_info = {
.need_gfx_hws = 1, .has_hotplug = 1,
.has_bsd_ring = 1,
.has_blt_ring = 1,
+ .has_llc = 1,
};
static const struct intel_device_info intel_ivybridge_m_info = {
@@ -237,6 +240,7 @@ static const struct intel_device_info intel_ivybridge_m_info = {
.has_fbc = 0, /* FBC is not enabled on Ivybridge mobile yet */
.has_bsd_ring = 1,
.has_blt_ring = 1,
+ .has_llc = 1,
};
static const struct pci_device_id pciidlist[] = { /* aka */
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 602bc80..dcafe93 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -255,6 +255,7 @@ struct intel_device_info {
u8 supports_tv:1;
u8 has_bsd_ring:1;
u8 has_blt_ring:1;
+ u8 has_llc:1;
};
enum no_fbc_reason {
@@ -970,6 +971,7 @@ struct drm_i915_file_private {
#define HAS_BSD(dev) (INTEL_INFO(dev)->has_bsd_ring)
#define HAS_BLT(dev) (INTEL_INFO(dev)->has_blt_ring)
+#define HAS_LLC(dev) (INTEL_INFO(dev)->has_llc)
#define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws)
#define HAS_OVERLAY(dev) (INTEL_INFO(dev)->has_overlay)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e55badb..eb98a7f 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3619,8 +3619,8 @@ struct drm_i915_gem_object *i915_gem_alloc_object(struct drm_device *dev,
obj->base.write_domain = I915_GEM_DOMAIN_CPU;
obj->base.read_domains = I915_GEM_DOMAIN_CPU;
- if (IS_GEN6(dev) || IS_GEN7(dev)) {
- /* On Gen6, we can have the GPU use the LLC (the CPU
+ if (HAS_LLC(dev)) {
+ /* On some devices, we can have the GPU use the LLC (the CPU
* cache) for about a 10% performance improvement
* compared to uncached. Graphics requests other than
* display scanout are coherent with the CPU in
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 924f6a4..da929bb 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -296,6 +296,7 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_HAS_EXEC_CONSTANTS 14
#define I915_PARAM_HAS_RELAXED_DELTA 15
#define I915_PARAM_HAS_GEN7_SOL_RESET 16
+#define I915_PARAM_HAS_LLC 17
typedef struct drm_i915_getparam {
int param;
--
1.7.8.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 1/1] drm/i915: add a LLC feature flag in device description
2012-01-17 16:43 [PATCH 1/1] drm/i915: add a LLC feature flag in device description Eugeni Dodonov
@ 2012-01-17 17:31 ` Eric Anholt
2012-01-17 18:11 ` Kenneth Graunke
2012-01-17 19:04 ` Daniel Vetter
2 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2012-01-17 17:31 UTC (permalink / raw)
To: intel-gfx; +Cc: Eugeni Dodonov
[-- Attachment #1.1: Type: text/plain, Size: 391 bytes --]
On Tue, 17 Jan 2012 14:43:53 -0200, Eugeni Dodonov <eugeni.dodonov@intel.com> wrote:
> LLC is not SNB/IVB-specific, so we should check for it in a more generic
> way.
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] drm/i915: add a LLC feature flag in device description
2012-01-17 16:43 [PATCH 1/1] drm/i915: add a LLC feature flag in device description Eugeni Dodonov
2012-01-17 17:31 ` Eric Anholt
@ 2012-01-17 18:11 ` Kenneth Graunke
2012-01-17 19:04 ` Daniel Vetter
2 siblings, 0 replies; 4+ messages in thread
From: Kenneth Graunke @ 2012-01-17 18:11 UTC (permalink / raw)
To: Eugeni Dodonov; +Cc: intel-gfx
On 01/17/2012 08:43 AM, Eugeni Dodonov wrote:
> LLC is not SNB/IVB-specific, so we should check for it in a more generic
> way.
>
> Reviewed-by: Chris Wilson<chris@chris-wilson.co.uk>
> Reviewed-by: Daniel Vetter<daniel.vetter@ffwll.ch>
> Signed-off-by: Eugeni Dodonov<eugeni.dodonov@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] drm/i915: add a LLC feature flag in device description
2012-01-17 16:43 [PATCH 1/1] drm/i915: add a LLC feature flag in device description Eugeni Dodonov
2012-01-17 17:31 ` Eric Anholt
2012-01-17 18:11 ` Kenneth Graunke
@ 2012-01-17 19:04 ` Daniel Vetter
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2012-01-17 19:04 UTC (permalink / raw)
To: Eugeni Dodonov; +Cc: intel-gfx
On Tue, Jan 17, 2012 at 02:43:53PM -0200, Eugeni Dodonov wrote:
> LLC is not SNB/IVB-specific, so we should check for it in a more generic
> way.
>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-17 19:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-17 16:43 [PATCH 1/1] drm/i915: add a LLC feature flag in device description Eugeni Dodonov
2012-01-17 17:31 ` Eric Anholt
2012-01-17 18:11 ` Kenneth Graunke
2012-01-17 19:04 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.