[Mesa-dev] [PATCH 5/5] intel: Remove check for kernel 2.6.29.

Daniel Vetter daniel at ffwll.ch
Sat Apr 6 05:09:52 PDT 2013


On Sat, Apr 06, 2013 at 12:26:40AM -0700, Kenneth Graunke wrote:
> Now that we require 2.6.39, there's no need to also check for 2.6.29.
> Calling drm_intel_bufmgr_gem_enable_fenced_relocs() without checking
> should be safe, as it simply sets a flag.
> 
> This does remove the check for zero fences available, but that doesn't
> seem worth checking.

Iirc this can only happen when we have ums and the ddx wants more fences
than it should ask for. Ums is long gone, too. Last two patches are

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Aside: We have a bit an accounting bug here in libdrm in that libdrm and
the kernel don't take into account that the number of pinned fences can
change while running (e.g. per-crtc fbs or pageflipping temporarily
pinning more buffers). Given that another fence undercount corner case bug
in UXA/libdrm survived for about 4 years until it was reported, I don't
care one bit ;-)

Cheers, Daniel

> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
>  src/mesa/drivers/dri/intel/intel_screen.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
> index eb451ba..58496e2 100644
> --- a/src/mesa/drivers/dri/intel/intel_screen.c
> +++ b/src/mesa/drivers/dri/intel/intel_screen.c
> @@ -989,7 +989,6 @@ static bool
>  intel_init_bufmgr(struct intel_screen *intelScreen)
>  {
>     __DRIscreen *spriv = intelScreen->driScrnPriv;
> -   int num_fences = 0;
>  
>     intelScreen->no_hw = getenv("INTEL_NO_HW") != NULL;
>  
> @@ -1000,12 +999,6 @@ intel_init_bufmgr(struct intel_screen *intelScreen)
>        return false;
>     }
>  
> -   if (!intel_get_param(spriv, I915_PARAM_NUM_FENCES_AVAIL, &num_fences) ||
> -       num_fences == 0) {
> -      fprintf(stderr, "[%s: %u] Kernel 2.6.29 required.\n", __func__, __LINE__);
> -      return false;
> -   }
> -
>     drm_intel_bufmgr_gem_enable_fenced_relocs(intelScreen->bufmgr);
>  
>     if (!intel_get_boolean(spriv, I915_PARAM_HAS_RELAXED_DELTA)) {
> -- 
> 1.8.2
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the mesa-dev mailing list