[PATCH] drm/tegra: Remove existing framebuffer only if we support display
Thomas Zimmermann
tzimmermann at suse.de
Wed Aug 30 10:19:15 UTC 2023
Hi
Am 25.08.23 um 15:22 schrieb Thierry Reding:
> From: Thierry Reding <treding at nvidia.com>
>
> Tegra DRM doesn't support display on Tegra234 and later, so make sure
> not to remove any existing framebuffers in that case.
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
> drivers/gpu/drm/tegra/drm.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
> index b1e1a78e30c6..7a38dadbc264 100644
> --- a/drivers/gpu/drm/tegra/drm.c
> +++ b/drivers/gpu/drm/tegra/drm.c
> @@ -1220,9 +1220,11 @@ static int host1x_drm_probe(struct host1x_device *dev)
>
> drm_mode_config_reset(drm);
>
> - err = drm_aperture_remove_framebuffers(&tegra_drm_driver);
> - if (err < 0)
> - goto hub;
> + if (drm->mode_config.num_crtc > 0) {
If you don't support the hardware, wouldn't it be better to return
-ENODEV if !num_crtc?
Best regards
Thomas
> + err = drm_aperture_remove_framebuffers(&tegra_drm_driver);
> + if (err < 0)
> + goto hub;
> + }
>
> err = drm_dev_register(drm, 0);
> if (err < 0)
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230830/69f82629/attachment.sig>
More information about the dri-devel
mailing list