All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] intel: properly test for HAS_LLC
@ 2012-08-31  9:18 Daniel Vetter
  2012-09-01  7:58 ` Chris Wilson
  2012-09-08  6:22 ` Ben Widawsky
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-08-31  9:18 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

If the kernel supports the test, we need to check the param.
Copy&pasta from the above checks that only look at the return value.
Interesting how much one can get such a simple interface wrong.

Issue created in

commit 151cdcfe685ee280a4344dfc40e6087d74a5590f
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Tue Jan 17 15:20:19 2012 -0200

    intel: query for LLC support

Patch even claims to have fixed this in v2, but is actually unchanged
from v1.

Reported-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 intel/intel_bufmgr_gem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 7953137..3bcc849 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -3112,7 +3112,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 		bufmgr_gem->has_llc = (IS_GEN6(bufmgr_gem->pci_device) |
 				IS_GEN7(bufmgr_gem->pci_device));
 	} else
-		bufmgr_gem->has_llc = ret == 0;
+		bufmgr_gem->has_llc = gp.value;
 
 	if (bufmgr_gem->gen < 4) {
 		gp.param = I915_PARAM_NUM_FENCES_AVAIL;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] intel: properly test for HAS_LLC
  2012-08-31  9:18 [PATCH] intel: properly test for HAS_LLC Daniel Vetter
@ 2012-09-01  7:58 ` Chris Wilson
  2012-09-08  6:22 ` Ben Widawsky
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2012-09-01  7:58 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

On Fri, 31 Aug 2012 11:18:53 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> If the kernel supports the test, we need to check the param.
> Copy&pasta from the above checks that only look at the return value.
> Interesting how much one can get such a simple interface wrong.

Interesting, didn't realise libdrm declared that we even had LLC on 8xx!

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] intel: properly test for HAS_LLC
  2012-08-31  9:18 [PATCH] intel: properly test for HAS_LLC Daniel Vetter
  2012-09-01  7:58 ` Chris Wilson
@ 2012-09-08  6:22 ` Ben Widawsky
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Widawsky @ 2012-09-08  6:22 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Intel Graphics Development

On Fri, 31 Aug 2012 11:18:53 +0200
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> If the kernel supports the test, we need to check the param.
> Copy&pasta from the above checks that only look at the return value.
> Interesting how much one can get such a simple interface wrong.
> 
> Issue created in
> 
> commit 151cdcfe685ee280a4344dfc40e6087d74a5590f
> Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
> Date:   Tue Jan 17 15:20:19 2012 -0200
> 
>     intel: query for LLC support
> 
> Patch even claims to have fixed this in v2, but is actually unchanged
> from v1.
> 
> Reported-by: Xiang, Haihao <haihao.xiang@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

-- 
Ben Widawsky, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-08  6:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31  9:18 [PATCH] intel: properly test for HAS_LLC Daniel Vetter
2012-09-01  7:58 ` Chris Wilson
2012-09-08  6:22 ` Ben Widawsky

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.