Re: [PATCH 01/15] drm/panel: simple: switch to struct drm_edid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/04/2024 15:22, Jani Nikula wrote:
Prefer struct drm_edid based functions over struct edid.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

---

Cc: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Cc: Jessica Zhang <quic_jesszhan@xxxxxxxxxxx>
Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
---
  drivers/gpu/drm/panel/panel-simple.c | 15 ++++++++-------
  1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 7215cf767898..d3264fa2f3ff 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -151,7 +151,7 @@ struct panel_simple {
struct gpio_desc *enable_gpio; - struct edid *edid;
+	const struct drm_edid *drm_edid;
struct drm_display_mode override_mode; @@ -309,8 +309,8 @@ static int panel_simple_suspend(struct device *dev)
  	regulator_disable(p->supply);
  	p->unprepared_time = ktime_get_boottime();
- kfree(p->edid);
-	p->edid = NULL;
+	drm_edid_free(p->drm_edid);
+	p->drm_edid = NULL;
return 0;
  }
@@ -399,11 +399,12 @@ static int panel_simple_get_modes(struct drm_panel *panel,
  	if (p->ddc) {
  		pm_runtime_get_sync(panel->dev);
- if (!p->edid)
-			p->edid = drm_get_edid(connector, p->ddc);
+		if (!p->drm_edid)
+			p->drm_edid = drm_edid_read_ddc(connector, p->ddc);
- if (p->edid)
-			num += drm_add_edid_modes(connector, p->edid);
+		drm_edid_connector_update(connector, p->drm_edid);
+
+		num += drm_edid_connector_add_modes(connector);
pm_runtime_mark_last_busy(panel->dev);
  		pm_runtime_put_autosuspend(panel->dev);

Reviewed-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux