All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/edid : cache edid range limits in drm connector
@ 2016-05-03 15:05 Vitaly Prosyak
  2016-05-03 15:05 ` [PATCH] drm/edid : calculate vsync and hsync from range limits block according to the EDID 1.4 Vitaly Prosyak
  2016-05-03 20:23 ` [PATCH] drm/edid : cache edid range limits in drm connector Daniel Vetter
  0 siblings, 2 replies; 10+ messages in thread
From: Vitaly Prosyak @ 2016-05-03 15:05 UTC (permalink / raw)
  To: dri-devel; +Cc: Vitaly Prosyak

Cache in drm connector the edid range limits properties:
min/max vertical refresh rates and max pixel clock.
It would be used when enter to drr mode.

Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
---
 drivers/gpu/drm/drm_edid.c | 11 +++++++++++
 include/drm/drm_crtc.h     |  5 +++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 04cb487..7e49962 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2190,6 +2190,17 @@ do_inferred_modes(struct detailed_timing *timing, void *c)
 							  timing);
 		break;
 	case 0x01: /* just the ranges, no formula */
+		closure->connector->min_vfreq = range->min_vfreq;
+		closure->connector->max_vfreq = range->max_vfreq;
+		if (closure->edid->revision >= 4) {
+			if ((range->flags & 0x03) == 0x3)
+				closure->connector->min_vfreq += 255;
+			if (range->flags & 0x02)
+				closure->connector->max_vfreq += 255;
+		}
+		closure->connector->max_pixel_clock_khz =
+			range_pixel_clock(closure->edid, (u8 *)timing);
+		break;
 	default:
 		break;
 	}
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index c5b4b81..85fc554 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1230,6 +1230,11 @@ struct drm_connector {
 	uint8_t num_h_tile, num_v_tile;
 	uint8_t tile_h_loc, tile_v_loc;
 	uint16_t tile_h_size, tile_v_size;
+
+	/*EDID range limits for drr*/
+	int min_vfreq ;
+	int max_vfreq ;
+	int max_pixel_clock_khz;
 };
 
 /**
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-05-04 14:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-03 15:05 [PATCH] drm/edid : cache edid range limits in drm connector Vitaly Prosyak
2016-05-03 15:05 ` [PATCH] drm/edid : calculate vsync and hsync from range limits block according to the EDID 1.4 Vitaly Prosyak
2016-05-03 20:26   ` Daniel Vetter
2016-05-04 13:42     ` Prosyak, Vitaly
2016-05-03 20:26   ` Daniel Vetter
2016-05-04 14:31   ` Jani Nikula
2016-05-03 20:23 ` [PATCH] drm/edid : cache edid range limits in drm connector Daniel Vetter
2016-05-03 20:45   ` Prosyak, Vitaly
2016-05-03 21:01   ` Prosyak, Vitaly
2016-05-04  7:10     ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.