* [PATCH] uxa: intel_sync_close() is only available when HAVE_DRI3
@ 2014-09-13 17:45 Sedat Dilek
2014-09-15 7:58 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Sedat Dilek @ 2014-09-13 17:45 UTC (permalink / raw)
To: intel-gfx, Chris Wilson; +Cc: Sedat Dilek
With LLVM v3.4.2 I got this error reported:
...
intel_driver.c:1182:2: error: implicit declaration of function 'intel_sync_close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
intel_sync_close(screen);
^
In file included from intel_uxa.c:44:
./intel_glamor.h:92:1: warning: unused function 'intel_glamor_fd_from_pixmap' [-Wunused-function]
intel_glamor_fd_from_pixmap(ScreenPtr screen,
^
intel_driver.c:1182:2: note: did you mean 'intel_mode_close'?
./intel.h:356:13: note: 'intel_mode_close' declared here
extern void intel_mode_close(intel_screen_private *intel);
...
Looking at <uxa/intel.h> intel_sync_close() is only available when DRI3 is supported.
516: #if HAVE_DRI3
517: Bool intel_sync_init(ScreenPtr screen);
518: void intel_sync_close(ScreenPtr screen);
519: #endif
Fix the issue by embedding intel_sync_close() with a HAVE_DRI3 ifdef check.
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
src/uxa/intel_driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/uxa/intel_driver.c b/src/uxa/intel_driver.c
index f31f7bd..9f527fd 100644
--- a/src/uxa/intel_driver.c
+++ b/src/uxa/intel_driver.c
@@ -1179,7 +1179,9 @@ static Bool I830CloseScreen(CLOSE_SCREEN_ARGS_DECL)
intel->dri3 = DRI_NONE;
}
+#if HAVE_DRI3
intel_sync_close(screen);
+#endif
xf86GARTCloseScreen(scrn->scrnIndex);
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] uxa: intel_sync_close() is only available when HAVE_DRI3
2014-09-13 17:45 [PATCH] uxa: intel_sync_close() is only available when HAVE_DRI3 Sedat Dilek
@ 2014-09-15 7:58 ` Chris Wilson
2014-09-15 11:12 ` Sedat Dilek
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2014-09-15 7:58 UTC (permalink / raw)
To: Sedat Dilek; +Cc: intel-gfx
On Sat, Sep 13, 2014 at 07:45:01PM +0200, Sedat Dilek wrote:
> With LLVM v3.4.2 I got this error reported:
> ...
> intel_driver.c:1182:2: error: implicit declaration of function 'intel_sync_close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
> intel_sync_close(screen);
> ^
> In file included from intel_uxa.c:44:
> ./intel_glamor.h:92:1: warning: unused function 'intel_glamor_fd_from_pixmap' [-Wunused-function]
> intel_glamor_fd_from_pixmap(ScreenPtr screen,
> ^
> intel_driver.c:1182:2: note: did you mean 'intel_mode_close'?
> ./intel.h:356:13: note: 'intel_mode_close' declared here
> extern void intel_mode_close(intel_screen_private *intel);
> ...
>
> Looking at <uxa/intel.h> intel_sync_close() is only available when DRI3 is supported.
>
> 516: #if HAVE_DRI3
> 517: Bool intel_sync_init(ScreenPtr screen);
> 518: void intel_sync_close(ScreenPtr screen);
> 519: #endif
>
> Fix the issue by embedding intel_sync_close() with a HAVE_DRI3 ifdef check.
>
> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
I went with a slightly different approach to keep the ifdefery out of
the body:
commit 067115a51b2646538a38ba603c688233c61e23cd
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Sep 15 08:44:41 2014 +0100
uxa: Stub out intel_sync_init|fini when not compiled in
In order to fix the build without DRI3, we need to stub out the
functions not compiled in, such as intel_sync_fini().
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks for the bug report and patch,
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] uxa: intel_sync_close() is only available when HAVE_DRI3
2014-09-15 7:58 ` Chris Wilson
@ 2014-09-15 11:12 ` Sedat Dilek
0 siblings, 0 replies; 3+ messages in thread
From: Sedat Dilek @ 2014-09-15 11:12 UTC (permalink / raw)
To: Chris Wilson, Sedat Dilek, intel-gfx
On Mon, Sep 15, 2014 at 9:58 AM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Sat, Sep 13, 2014 at 07:45:01PM +0200, Sedat Dilek wrote:
>> With LLVM v3.4.2 I got this error reported:
>> ...
>> intel_driver.c:1182:2: error: implicit declaration of function 'intel_sync_close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>> intel_sync_close(screen);
>> ^
>> In file included from intel_uxa.c:44:
>> ./intel_glamor.h:92:1: warning: unused function 'intel_glamor_fd_from_pixmap' [-Wunused-function]
>> intel_glamor_fd_from_pixmap(ScreenPtr screen,
>> ^
>> intel_driver.c:1182:2: note: did you mean 'intel_mode_close'?
>> ./intel.h:356:13: note: 'intel_mode_close' declared here
>> extern void intel_mode_close(intel_screen_private *intel);
>> ...
>>
>> Looking at <uxa/intel.h> intel_sync_close() is only available when DRI3 is supported.
>>
>> 516: #if HAVE_DRI3
>> 517: Bool intel_sync_init(ScreenPtr screen);
>> 518: void intel_sync_close(ScreenPtr screen);
>> 519: #endif
>>
>> Fix the issue by embedding intel_sync_close() with a HAVE_DRI3 ifdef check.
>>
>> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
>
> I went with a slightly different approach to keep the ifdefery out of
> the body:
>
> commit 067115a51b2646538a38ba603c688233c61e23cd
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date: Mon Sep 15 08:44:41 2014 +0100
>
> uxa: Stub out intel_sync_init|fini when not compiled in
>
> In order to fix the build without DRI3, we need to stub out the
> functions not compiled in, such as intel_sync_fini().
>
> Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Thanks for the bug report and patch,
Great!
I was thinking of adding stubs later, but I needed a fast dirty hack.
Thanks for the quick fix!
- Sedat -
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-15 11:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-13 17:45 [PATCH] uxa: intel_sync_close() is only available when HAVE_DRI3 Sedat Dilek
2014-09-15 7:58 ` Chris Wilson
2014-09-15 11:12 ` Sedat Dilek
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.