sna: Partly revert "sna: Compilation fixes for stable distros"
diff mbox

Message ID 1433514216-2854-1-git-send-email-sedat.dilek@gmail.com
State New
Headers show

Commit Message

Sedat Dilek June 5, 2015, 2:23 p.m. UTC
Fixes a problem having no mouse cursor in the LightDM login-screen
on Ubuntu/precise (see [1]).

[1] http://lists.freedesktop.org/archives/intel-gfx/2015-June/068096.html

Fixes: 7d30ccea214b ("sna: Compilation fixes for stable distros")
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
 src/sna/kgem.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Chris Wilson June 5, 2015, 2:31 p.m. UTC | #1
On Fri, Jun 05, 2015 at 04:23:36PM +0200, Sedat Dilek wrote:
> Fixes a problem having no mouse cursor in the LightDM login-screen
> on Ubuntu/precise (see [1]).
> 
> [1] http://lists.freedesktop.org/archives/intel-gfx/2015-June/068096.html
> 
> Fixes: 7d30ccea214b ("sna: Compilation fixes for stable distros")
> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
> ---
>  src/sna/kgem.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/sna/kgem.c b/src/sna/kgem.c
> index de604b0f3d77..720644b26750 100644
> --- a/src/sna/kgem.c
> +++ b/src/sna/kgem.c
> @@ -140,7 +140,6 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
>  #define LOCAL_I915_PARAM_HAS_WT			27
>  #define LOCAL_I915_PARAM_MMAP_VERSION		30
>  
> -#define LOCAL_I915_EXEC_BLT			(2<<0)
>  #define LOCAL_I915_EXEC_IS_PINNED		(1<<10)
>  #define LOCAL_I915_EXEC_NO_RELOC		(1<<11)
>  #define LOCAL_I915_EXEC_HANDLE_LUT		(1<<12)
> @@ -1400,7 +1399,7 @@ static bool test_can_blt_y(struct kgem *kgem)
>  		memset(&execbuf, 0, sizeof(execbuf));
>  		execbuf.buffers_ptr = (uintptr_t)&object;
>  		execbuf.buffer_count = 1;
> -		execbuf.flags = LOCAL_I915_EXEC_BLT;
> +		execbuf.flags = I915_EXEC_BLT;

Again, I am confused. The effect is instead of executing on BLT we ended
up on BSD. Which is fine for the purposes of this test and the test did
succeed.

What's the result of this function after your patch? It should still be
true. So I think we are looking at a funky underlying bug here...
-Chris
Sedat Dilek June 5, 2015, 2:39 p.m. UTC | #2
On Fri, Jun 5, 2015 at 4:31 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Fri, Jun 05, 2015 at 04:23:36PM +0200, Sedat Dilek wrote:
>> Fixes a problem having no mouse cursor in the LightDM login-screen
>> on Ubuntu/precise (see [1]).
>>
>> [1] http://lists.freedesktop.org/archives/intel-gfx/2015-June/068096.html
>>
>> Fixes: 7d30ccea214b ("sna: Compilation fixes for stable distros")
>> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
>> ---
>>  src/sna/kgem.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/src/sna/kgem.c b/src/sna/kgem.c
>> index de604b0f3d77..720644b26750 100644
>> --- a/src/sna/kgem.c
>> +++ b/src/sna/kgem.c
>> @@ -140,7 +140,6 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
>>  #define LOCAL_I915_PARAM_HAS_WT                      27
>>  #define LOCAL_I915_PARAM_MMAP_VERSION                30
>>
>> -#define LOCAL_I915_EXEC_BLT                  (2<<0)
>>  #define LOCAL_I915_EXEC_IS_PINNED            (1<<10)
>>  #define LOCAL_I915_EXEC_NO_RELOC             (1<<11)
>>  #define LOCAL_I915_EXEC_HANDLE_LUT           (1<<12)
>> @@ -1400,7 +1399,7 @@ static bool test_can_blt_y(struct kgem *kgem)
>>               memset(&execbuf, 0, sizeof(execbuf));
>>               execbuf.buffers_ptr = (uintptr_t)&object;
>>               execbuf.buffer_count = 1;
>> -             execbuf.flags = LOCAL_I915_EXEC_BLT;
>> +             execbuf.flags = I915_EXEC_BLT;
>
> Again, I am confused. The effect is instead of executing on BLT we ended
> up on BSD. Which is fine for the purposes of this test and the test did
> succeed.
>
> What's the result of this function after your patch? It should still be
> true. So I think we are looking at a funky underlying bug here...
>

How can I test that or check?

- sed@ -

Patch
diff mbox

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index de604b0f3d77..720644b26750 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -140,7 +140,6 @@  search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
 #define LOCAL_I915_PARAM_HAS_WT			27
 #define LOCAL_I915_PARAM_MMAP_VERSION		30
 
-#define LOCAL_I915_EXEC_BLT			(2<<0)
 #define LOCAL_I915_EXEC_IS_PINNED		(1<<10)
 #define LOCAL_I915_EXEC_NO_RELOC		(1<<11)
 #define LOCAL_I915_EXEC_HANDLE_LUT		(1<<12)
@@ -1400,7 +1399,7 @@  static bool test_can_blt_y(struct kgem *kgem)
 		memset(&execbuf, 0, sizeof(execbuf));
 		execbuf.buffers_ptr = (uintptr_t)&object;
 		execbuf.buffer_count = 1;
-		execbuf.flags = LOCAL_I915_EXEC_BLT;
+		execbuf.flags = I915_EXEC_BLT;
 
 		ret = do_ioctl(kgem->fd,
 			       DRM_IOCTL_I915_GEM_EXECBUFFER2,