From 08f87f769b595151be1afeff53e144f543faa614 Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 06 Dec 2023 09:51:13 +0000 Subject: [PATCH] add dts config --- kernel/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 17 +++++++---------- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/kernel/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/kernel/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c index 8fd8124..be28e7b 100644 --- a/kernel/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c +++ b/kernel/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c @@ -24,8 +24,8 @@ * */ -#include <drm/drmP.h> #include <drm/drm_crtc_helper.h> +#include <drm/drm_probe_helper.h> #include "nouveau_drv.h" #include "nouveau_reg.h" #include "nouveau_encoder.h" @@ -599,7 +599,7 @@ helper->dpms(encoder, DRM_MODE_DPMS_ON); NV_INFO(drm, "Output %s is running on CRTC %d using output %c\n", - nouveau_encoder_connector_get(nv_encoder)->base.name, + nv04_encoder_get_connector(nv_encoder)->base.name, nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); } @@ -644,16 +644,13 @@ int i; if (nouveau_tv_norm) { - for (i = 0; i < num_tv_norms; i++) { - if (!strcmp(nv17_tv_norm_names[i], nouveau_tv_norm)) { - tv_enc->tv_norm = i; - break; - } - } - - if (i == num_tv_norms) + i = match_string(nv17_tv_norm_names, num_tv_norms, + nouveau_tv_norm); + if (i < 0) NV_WARN(drm, "Invalid TV norm setting \"%s\"\n", nouveau_tv_norm); + else + tv_enc->tv_norm = i; } drm_mode_create_tv_properties(dev, num_tv_norms, nv17_tv_norm_names); -- Gitblit v1.6.2