Jonathan Gray writes:

> try the diff below which brings in
> xf86-video-amdgpu-23.0.0..31a092ae71371fb473a3a51f70fe58e1f42e283b
>
> the last commit is the one referenced in:
> https://gitlab.freedesktop.org/drm/amd/-/issues/2852
>
> https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/commit/31a092ae71371fb473a3a51f70fe58e1f42e283b

When trying the diff the problem remains.

Here is my Xorg.0.log with starting ezquake causing the repeated messages:
https://messagemode2.com/public/Xorg.txt

Ignore my print debugging of namtsui to ensure I was compiling xenocara
correctly: "namtsui VariableRefresh: disabled"

VariableRefresh is not used because they are set like so:
VariableRefresh: disabled
AsyncFlipSecondaries: disabled
KMS Pageflipping: enabled

https://bbs.archlinux.org/viewtopic.php?id=289042 mentions
AsyncFlipSecondaries false in post 5.

(I initially set HZ to 1000 in the kernel which caused the log file to
fill up faster, but this happens with the default kernel, too.) I tested
with both a single 360 hz monitor displayport and a single 144 hz
monitor displayport. There is the same behavior on both.

>
> Index: driver/xf86-video-amdgpu/man/amdgpu.man
> ===================================================================
> RCS file: /cvs/xenocara/driver/xf86-video-amdgpu/man/amdgpu.man,v
> diff -u -p -r1.4 amdgpu.man
> --- driver/xf86-video-amdgpu/man/amdgpu.man   1 Mar 2023 20:21:10 -0000       
> 1.4
> +++ driver/xf86-video-amdgpu/man/amdgpu.man   16 Apr 2024 09:55:23 -0000
> @@ -81,7 +81,8 @@ on. If this option is set, the default v
>  accordingly. If this option isn't set, the default value of the property is
>  .B auto,
>  which means that TearFree is on for rotated outputs, outputs with RandR
> -transforms applied and for RandR 1.4 secondary outputs, otherwise off.
> +transforms applied, for RandR 1.4 secondary outputs and if 'VariableRefresh'
> +is enabled, otherwise it's off.
>  .TP
>  .BI "Option \*qVariableRefresh\*q \*q" boolean \*q
>  Enables support for enabling variable refresh on the Screen's CRTCs
> Index: driver/xf86-video-amdgpu/src/amdgpu_kms.c
> ===================================================================
> RCS file: /cvs/xenocara/driver/xf86-video-amdgpu/src/amdgpu_kms.c,v
> diff -u -p -r1.6 amdgpu_kms.c
> --- driver/xf86-video-amdgpu/src/amdgpu_kms.c 1 Mar 2023 20:21:10 -0000       
> 1.6
> +++ driver/xf86-video-amdgpu/src/amdgpu_kms.c 16 Apr 2024 09:55:23 -0000
> @@ -1657,6 +1657,10 @@ Bool AMDGPUPreInit_KMS(ScrnInfoPtr pScrn
>                       from = xf86GetOptValBool(info->Options, 
> OPTION_VARIABLE_REFRESH,
>                                                &info->vrr_support) ? X_CONFIG 
> : X_DEFAULT;
>  
> +                     if (info->vrr_support && !info->tear_free)
> +                             xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
> +                                        "Enabling VariableRefresh while 
> TearFree is disabled can cause instability!\n");
> +
>                       xf86DrvMsg(pScrn->scrnIndex, from, "VariableRefresh: 
> %sabled\n",
>                                  info->vrr_support ? "en" : "dis");
>  
> Index: driver/xf86-video-amdgpu/src/drmmode_display.c
> ===================================================================
> RCS file: /cvs/xenocara/driver/xf86-video-amdgpu/src/drmmode_display.c,v
> diff -u -p -r1.4 drmmode_display.c
> --- driver/xf86-video-amdgpu/src/drmmode_display.c    5 Dec 2022 16:41:17 
> -0000       1.4
> +++ driver/xf86-video-amdgpu/src/drmmode_display.c    16 Apr 2024 09:55:23 
> -0000
> @@ -597,6 +597,7 @@ drmmode_crtc_update_tear_free(xf86CrtcPt
>                   (drmmode_output->tear_free == 2 &&
>                    (crtc->scrn->pScreen->isGPU ||
>                     info->shadow_primary ||
> +                   info->vrr_support ||
>                     crtc->transformPresent || crtc->rotation != 
> RR_Rotate_0))) {
>                       drmmode_crtc->tear_free = TRUE;
>                       return;
> @@ -1268,6 +1269,11 @@ drmmode_set_mode(xf86CrtcPtr crtc, struc
>               if (output->crtc != crtc)
>                       continue;
>  
> +             if (!drmmode_output->mode_output) {
> +                     ret = FALSE;
> +                     goto out;
> +             }
> +
>               output_ids[output_count] = 
> drmmode_output->mode_output->connector_id;
>               output_count++;
>       }
> @@ -1286,6 +1292,7 @@ drmmode_set_mode(xf86CrtcPtr crtc, struc
>                          "failed to set mode: %s\n", strerror(errno));
>       }
>  
> +out:
>       free(output_ids);
>       return ret;
>  }

Reply via email to