All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH xf86-video-amdgpu] If glamor is too old for depth 30, fall back to ShadowFB
@ 2018-02-14 18:09 Michel Dänzer
       [not found] ` <20180214180947.6183-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Michel Dänzer @ 2018-02-14 18:09 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Michel Dänzer <michel.daenzer@amd.com>

Instead of not starting up at all.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 src/amdgpu_kms.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 15adb2938..e1aae9952 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1083,14 +1083,7 @@ static Bool AMDGPUPreInitVisual(ScrnInfoPtr pScrn)
 	case 15:
 	case 16:
 	case 24:
-		break;
-
 	case 30:
-		if (xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
-			xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-				   "Depth 30 requires Xorg >= 1.19.99.1\n");
-			return FALSE;
-		}
 		break;
 
 	default:
@@ -1173,6 +1166,14 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
 			use_glamor = FALSE;
 #endif
 
+		if (pScrn->depth == 30 && use_glamor &&
+		    xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
+			xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+				   "Depth 30 is not supported by GLAMOR with "
+				   "Xorg < 1.19.99.1\n");
+			goto shadowfb;
+		}
+
 #ifdef DRI2
 		info->dri2.available = ! !xf86LoadSubModule(pScrn, "dri2");
 #endif
@@ -1190,6 +1191,7 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
 				   "ShadowFB\n");
 		}
 	} else {
+shadowfb:
 		xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
 			   "GPU acceleration disabled, using ShadowFB\n");
 	}
-- 
2.16.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH xf86-video-amdgpu] If glamor is too old for depth 30, fall back to ShadowFB
       [not found] ` <20180214180947.6183-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2018-02-14 18:23   ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2018-02-14 18:23 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: amd-gfx list

On Wed, Feb 14, 2018 at 1:09 PM, Michel Dänzer <michel@daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Instead of not starting up at all.
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  src/amdgpu_kms.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
> index 15adb2938..e1aae9952 100644
> --- a/src/amdgpu_kms.c
> +++ b/src/amdgpu_kms.c
> @@ -1083,14 +1083,7 @@ static Bool AMDGPUPreInitVisual(ScrnInfoPtr pScrn)
>         case 15:
>         case 16:
>         case 24:
> -               break;
> -
>         case 30:
> -               if (xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
> -                       xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
> -                                  "Depth 30 requires Xorg >= 1.19.99.1\n");
> -                       return FALSE;
> -               }
>                 break;
>
>         default:
> @@ -1173,6 +1166,14 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
>                         use_glamor = FALSE;
>  #endif
>
> +               if (pScrn->depth == 30 && use_glamor &&
> +                   xorgGetVersion() < XORG_VERSION_NUMERIC(1,19,99,1,0)) {
> +                       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
> +                                  "Depth 30 is not supported by GLAMOR with "
> +                                  "Xorg < 1.19.99.1\n");
> +                       goto shadowfb;
> +               }
> +
>  #ifdef DRI2
>                 info->dri2.available = ! !xf86LoadSubModule(pScrn, "dri2");
>  #endif
> @@ -1190,6 +1191,7 @@ static Bool AMDGPUPreInitAccel_KMS(ScrnInfoPtr pScrn)
>                                    "ShadowFB\n");
>                 }
>         } else {
> +shadowfb:
>                 xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
>                            "GPU acceleration disabled, using ShadowFB\n");
>         }
> --
> 2.16.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2018-02-14 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 18:09 [PATCH xf86-video-amdgpu] If glamor is too old for depth 30, fall back to ShadowFB Michel Dänzer
     [not found] ` <20180214180947.6183-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-02-14 18:23   ` Alex Deucher

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.