linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c"
@ 2013-08-08 18:00 Stephen Warren
  2013-08-08 18:13 ` David Herrmann
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2013-08-08 18:00 UTC (permalink / raw)
  To: David Herrmann; +Cc: dri-devel, linux-next, Dave Airlie

In next-20130808, building tegra_defconfig for ARM yields:

> drivers/built-in.o: In function `drm_lastclose':
> /home/swarren/shared/git_wa/kernel/kernel.git/drivers/gpu/drm/drm_drv.c:198: undefined reference to `drm_agp_clear'

That's because drm_agp_clear() is called unconditionally, yet is only
conditionally built into drm_agpsupport.c (#if __OS_HAS_AGP).

Should the call from drm_drv.c be conditional, or should there be a
dummy static inline replacement in include/drm/drmP.h for when AGP
support isn't available?

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

* Re: Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c"
  2013-08-08 18:00 Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c" Stephen Warren
@ 2013-08-08 18:13 ` David Herrmann
  2013-08-08 19:21   ` Stephen Warren
  0 siblings, 1 reply; 4+ messages in thread
From: David Herrmann @ 2013-08-08 18:13 UTC (permalink / raw)
  To: Stephen Warren; +Cc: dri-devel, linux-next, Dave Airlie

Hi

On Thu, Aug 8, 2013 at 8:00 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> In next-20130808, building tegra_defconfig for ARM yields:
>
>> drivers/built-in.o: In function `drm_lastclose':
>> /home/swarren/shared/git_wa/kernel/kernel.git/drivers/gpu/drm/drm_drv.c:198: undefined reference to `drm_agp_clear'
>
> That's because drm_agp_clear() is called unconditionally, yet is only
> conditionally built into drm_agpsupport.c (#if __OS_HAS_AGP).
>
> Should the call from drm_drv.c be conditional, or should there be a
> dummy static inline replacement in include/drm/drmP.h for when AGP
> support isn't available?

Sorry, I missed testing with AGP=n and the code I fixed depended on
dead-code-elimination to link correctly. I overlooked that. There is a
patch pending on dri-devel:
http://lists.freedesktop.org/archives/dri-devel/2013-August/043077.html

Regards
David

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

* Re: Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c"
  2013-08-08 18:13 ` David Herrmann
@ 2013-08-08 19:21   ` Stephen Warren
  2013-08-08 20:00     ` David Herrmann
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2013-08-08 19:21 UTC (permalink / raw)
  To: David Herrmann; +Cc: dri-devel, linux-next, Dave Airlie

On 08/08/2013 12:13 PM, David Herrmann wrote:
> Hi
> 
> On Thu, Aug 8, 2013 at 8:00 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> In next-20130808, building tegra_defconfig for ARM yields:
>>
>>> drivers/built-in.o: In function `drm_lastclose':
>>> /home/swarren/shared/git_wa/kernel/kernel.git/drivers/gpu/drm/drm_drv.c:198: undefined reference to `drm_agp_clear'
>>
>> That's because drm_agp_clear() is called unconditionally, yet is only
>> conditionally built into drm_agpsupport.c (#if __OS_HAS_AGP).
>>
>> Should the call from drm_drv.c be conditional, or should there be a
>> dummy static inline replacement in include/drm/drmP.h for when AGP
>> support isn't available?
> 
> Sorry, I missed testing with AGP=n and the code I fixed depended on
> dead-code-elimination to link correctly. I overlooked that. There is a
> patch pending on dri-devel:
> http://lists.freedesktop.org/archives/dri-devel/2013-August/043077.html

That makes it worse! To solve it, you need:

diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h
index f926542..a184eee 100644
--- a/include/drm/drm_agpsupport.h
+++ b/include/drm/drm_agpsupport.h
@@ -8,7 +8,7 @@
 #include <linux/agp_backend.h>
 #include <drm/drmP.h>

-#ifdef __OS_HAS_AGP
+#if __OS_HAS_AGP

 void drm_free_agp(DRM_AGP_MEM * handle, int pages);
 int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);

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

* Re: Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c"
  2013-08-08 19:21   ` Stephen Warren
@ 2013-08-08 20:00     ` David Herrmann
  0 siblings, 0 replies; 4+ messages in thread
From: David Herrmann @ 2013-08-08 20:00 UTC (permalink / raw)
  To: Stephen Warren; +Cc: dri-devel, linux-next, Dave Airlie

Hi

On Thu, Aug 8, 2013 at 9:21 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 08/08/2013 12:13 PM, David Herrmann wrote:
>> Hi
>>
>> On Thu, Aug 8, 2013 at 8:00 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> In next-20130808, building tegra_defconfig for ARM yields:
>>>
>>>> drivers/built-in.o: In function `drm_lastclose':
>>>> /home/swarren/shared/git_wa/kernel/kernel.git/drivers/gpu/drm/drm_drv.c:198: undefined reference to `drm_agp_clear'
>>>
>>> That's because drm_agp_clear() is called unconditionally, yet is only
>>> conditionally built into drm_agpsupport.c (#if __OS_HAS_AGP).
>>>
>>> Should the call from drm_drv.c be conditional, or should there be a
>>> dummy static inline replacement in include/drm/drmP.h for when AGP
>>> support isn't available?
>>
>> Sorry, I missed testing with AGP=n and the code I fixed depended on
>> dead-code-elimination to link correctly. I overlooked that. There is a
>> patch pending on dri-devel:
>> http://lists.freedesktop.org/archives/dri-devel/2013-August/043077.html
>
> That makes it worse! To solve it, you need:

Argh! I need some proper build environments to test all the non-x86
stuff. Thanks for the hint, I will resend the patch. Hopefully it'll
work this time. Sorry for that..

Thanks
David

> diff --git a/include/drm/drm_agpsupport.h b/include/drm/drm_agpsupport.h
> index f926542..a184eee 100644
> --- a/include/drm/drm_agpsupport.h
> +++ b/include/drm/drm_agpsupport.h
> @@ -8,7 +8,7 @@
>  #include <linux/agp_backend.h>
>  #include <drm/drmP.h>
>
> -#ifdef __OS_HAS_AGP
> +#if __OS_HAS_AGP
>
>  void drm_free_agp(DRM_AGP_MEM * handle, int pages);
>  int drm_bind_agp(DRM_AGP_MEM * handle, unsigned int start);
>

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

end of thread, other threads:[~2013-08-08 20:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-08 18:00 Build break due to 28ec711 "drm/agp: move AGP cleanup paths to drm_agpsupport.c" Stephen Warren
2013-08-08 18:13 ` David Herrmann
2013-08-08 19:21   ` Stephen Warren
2013-08-08 20:00     ` David Herrmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).