Re: [PATCH v4 3/5] drm/nouveau/gsp/r570: Add comp mode workaround from issue #3172217

From: David Airlie

Date: Wed Sep 16 2026 - 19:59:01 EST


On Thu, Sep 17, 2026 at 8:35 AM Lyude Paul <lyude@xxxxxxxxxx> wrote:
>
> One of the things that OpenRM does right before initiating fbsr is apply a
> special workaround (nvidia issue #3172217) which temporarily disables raw
> compression mode on the GPU. It is later re-enabled after resuming with
> fbsr completes.
>
> Since we don't currently save the compbit backing with fbsr, this shouldn't
> currently make any functional difference in the suspend/resume process. But
> it will be required for implementing support for saving and restoring
> compbit backings from the GPU.
>
> Signed-off-by: Lyude Paul <lyude@xxxxxxxxxx>
>
> ---
> V2:
> * Fix gsp object mismatch in r570_memsys_enable_raw_comp_mode()
> * Clarify debug message a bit in r570_memsys_enable_raw_comp_mode()
> V3:
> * Enable raw mode before rescheduling FIFO channels
>
> .../nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c | 48 +++++++++++++++++++
> .../nvkm/subdev/gsp/rm/r570/nvrm/fbsr.h | 6 +++
> 2 files changed, 54 insertions(+)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c
> index af5aa5065c3dd..fe618a94461dc 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c
> @@ -26,6 +26,35 @@ r570_fbsr_suspend_channels(struct nvkm_gsp *gsp, bool suspend)
> return nvkm_gsp_rm_ctrl_wr(&gsp->internal.device.subdevice, ctrl);
> }
>
> +static int
> +r570_memsys_enable_raw_comp_mode(struct nvkm_gsp *gsp, bool enable)
> +{
> + NV2080_CTRL_INTERNAL_MEMSYS_PROGRAM_RAW_COMPRESSION_MODE_PARAMS *ctrl;
> + int ret;
> +
> + ctrl = nvkm_gsp_rm_ctrl_get(&gsp->internal.device.object,
> + NV2080_CTRL_CMD_INTERNAL_MEMSYS_PROGRAM_RAW_COMPRESSION_MODE,
> + sizeof(*ctrl));

I think all 2080 need to be on gsp->internal.device.subdevice

Dave.