On Mon, Oct 26, 2020 at 11:29:43PM +1100, Jonathan Gray wrote:
> 
> I can reproduce the way it fails using an xorg.conf with 'Option "Accel" 
> "off"'.
> 
> Needs two commits to fix:
> c0eb5dbd9c1db6b6d5b1574bcd8c584170d7ab54 Don't crash X server if GPU 
> acceleration is not available
> 4d84cf438e7f1bebf0053035ef0292e9fed257d1 Handle NULL fb_ptr in pixmap_get_fb
> 
> Index: src/radeon.h
> ===================================================================
> RCS file: /cvs/xenocara/driver/xf86-video-ati/src/radeon.h,v
> retrieving revision 1.22
> diff -u -p -r1.22 radeon.h
> --- src/radeon.h      26 Oct 2019 09:37:25 -0000      1.22
> +++ src/radeon.h      26 Oct 2020 12:19:40 -0000
> @@ -790,8 +790,8 @@ static inline Bool radeon_set_pixmap_bo(
>  
>  static inline struct radeon_buffer *radeon_get_pixmap_bo(PixmapPtr pPix)
>  {
> -#ifdef USE_GLAMOR
>      RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen));
> +#ifdef USE_GLAMOR
>  
>      if (info->use_glamor) {
>       struct radeon_pixmap *priv;
> @@ -799,7 +799,7 @@ static inline struct radeon_buffer *rade
>       return priv ? priv->bo : NULL;
>      } else
>  #endif
> -    {
> +    if (info->accelOn) {
>       struct radeon_exa_pixmap_priv *driver_priv;
>       driver_priv = exaGetPixmapDriverPrivate(pPix);
>       return driver_priv ? driver_priv->bo : NULL;
> @@ -896,7 +896,7 @@ radeon_pixmap_get_fb(PixmapPtr pix)
>                                  handle);
>      }
>  
> -    return *fb_ptr;
> +    return fb_ptr ? *fb_ptr : NULL;
>  }
>  
>  

ok matthieu@
-- 
Matthieu Herrb

Reply via email to