diff mbox series

[v2,11/25] drm/edid: convert drm_gtf_modes_for_range() to drm_edid

Message ID b50377ce67fd3cee6628ea5865c80fa0fa7da990.1652097712.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/edid: introduce struct drm_edid | expand

Commit Message

Jani Nikula May 9, 2022, 12:03 p.m. UTC
We'll need to propagate drm_edid everywhere.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/drm_edid.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Ankit Nautiyal May 10, 2022, 9:05 a.m. UTC | #1
LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

Regards,

Ankit

On 5/9/2022 5:33 PM, Jani Nikula wrote:
> We'll need to propagate drm_edid everywhere.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>   drivers/gpu/drm/drm_edid.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 5d8744a7b62e..037102a4d0b5 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -3156,9 +3156,9 @@ void drm_mode_fixup_1366x768(struct drm_display_mode *mode)
>   	}
>   }
>   
> -static int
> -drm_gtf_modes_for_range(struct drm_connector *connector, const struct edid *edid,
> -			const struct detailed_timing *timing)
> +static int drm_gtf_modes_for_range(struct drm_connector *connector,
> +				   const struct drm_edid *drm_edid,
> +				   const struct detailed_timing *timing)
>   {
>   	int i, modes = 0;
>   	struct drm_display_mode *newmode;
> @@ -3172,7 +3172,7 @@ drm_gtf_modes_for_range(struct drm_connector *connector, const struct edid *edid
>   			return modes;
>   
>   		drm_mode_fixup_1366x768(newmode);
> -		if (!mode_in_range(newmode, edid, timing) ||
> +		if (!mode_in_range(newmode, drm_edid->edid, timing) ||
>   		    !valid_inferred_mode(connector, newmode)) {
>   			drm_mode_destroy(dev, newmode);
>   			continue;
> @@ -3236,7 +3236,7 @@ do_inferred_modes(const struct detailed_timing *timing, void *c)
>   	case 0x02: /* secondary gtf, XXX could do more */
>   	case 0x00: /* default gtf */
>   		closure->modes += drm_gtf_modes_for_range(closure->connector,
> -							  closure->drm_edid->edid,
> +							  closure->drm_edid,
>   							  timing);
>   		break;
>   	case 0x04: /* cvt, only in 1.4+ */
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 5d8744a7b62e..037102a4d0b5 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3156,9 +3156,9 @@  void drm_mode_fixup_1366x768(struct drm_display_mode *mode)
 	}
 }
 
-static int
-drm_gtf_modes_for_range(struct drm_connector *connector, const struct edid *edid,
-			const struct detailed_timing *timing)
+static int drm_gtf_modes_for_range(struct drm_connector *connector,
+				   const struct drm_edid *drm_edid,
+				   const struct detailed_timing *timing)
 {
 	int i, modes = 0;
 	struct drm_display_mode *newmode;
@@ -3172,7 +3172,7 @@  drm_gtf_modes_for_range(struct drm_connector *connector, const struct edid *edid
 			return modes;
 
 		drm_mode_fixup_1366x768(newmode);
-		if (!mode_in_range(newmode, edid, timing) ||
+		if (!mode_in_range(newmode, drm_edid->edid, timing) ||
 		    !valid_inferred_mode(connector, newmode)) {
 			drm_mode_destroy(dev, newmode);
 			continue;
@@ -3236,7 +3236,7 @@  do_inferred_modes(const struct detailed_timing *timing, void *c)
 	case 0x02: /* secondary gtf, XXX could do more */
 	case 0x00: /* default gtf */
 		closure->modes += drm_gtf_modes_for_range(closure->connector,
-							  closure->drm_edid->edid,
+							  closure->drm_edid,
 							  timing);
 		break;
 	case 0x04: /* cvt, only in 1.4+ */