Linux-Renesas-SoC Archive on lore.kernel.org
 help / color / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Guido Günther" <guido.gunther@puri.sm>
Cc: Sam Ravnborg <sam@ravnborg.org>,
	dri-devel@lists.freedesktop.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Abhinav Kumar <abhinavk@codeaurora.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Jitao Shi <jitao.shi@mediatek.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-renesas-soc@vger.kernel.org,
	linux-rockchip@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Purism Kernel Team <kernel@puri.sm>, Sean Paul <sean@poorly.run>,
	Stefan Agner <stefan@agner.ch>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Stefan Mavrodiev <stefan@olimex.com>,
	Robert Chiras <robert.chiras@nxp.com>
Subject: Re: [PATCH v1 05/26] drm/panel: add drm_connector argument to get_modes()
Date: Wed, 4 Dec 2019 15:11:02 +0200
Message-ID: <20191204131102.GA4852@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20191204120804.GC18094@bogon.m.sigxcpu.org>

Hi Guido,

On Wed, Dec 04, 2019 at 01:08:04PM +0100, Guido Günther wrote:
> On Mon, Dec 02, 2019 at 08:32:09PM +0100, Sam Ravnborg wrote:
> > Today the bridge creates the drm_connector, but that is planned
> > to be moved to the display drivers.
> 
> Do you have a reference for that move at hand?

https://patchwork.kernel.org/cover/10805353/

Not something that will be enforced right away, but I think it will
simplify display controller drivers, so I'll advocate switching to that
model.

> > To facilitate this, update drm_panel_funcs.get_modes() to
> > take drm_connector as an argument.
> > All panel drivers implementing get_modes() are updated.
> > 
> > Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: Sam Ravnborg <sam@ravnborg.org>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Maxime Ripard <mripard@kernel.org>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Jagan Teki <jagan@amarulasolutions.com>
> > Cc: Stefan Mavrodiev <stefan@olimex.com>
> > Cc: Robert Chiras <robert.chiras@nxp.com>
> > Cc: "Guido Günther" <agx@sigxcpu.org>
> > Cc: Purism Kernel Team <kernel@puri.sm>
> > ---
> >  drivers/gpu/drm/drm_panel.c                   |  2 +-
> >  drivers/gpu/drm/panel/panel-arm-versatile.c   |  4 +--
> >  .../drm/panel/panel-feiyang-fy07024di26a30d.c |  4 +--
> >  drivers/gpu/drm/panel/panel-ilitek-ili9322.c  |  5 ++--
> >  drivers/gpu/drm/panel/panel-ilitek-ili9881c.c |  8 +++---
> >  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 13 +++++----
> >  .../gpu/drm/panel/panel-jdi-lt070me05000.c    |  9 ++++---
> >  .../drm/panel/panel-kingdisplay-kd097d04.c    | 11 ++++----
> >  drivers/gpu/drm/panel/panel-lg-lb035q02.c     |  4 +--
> >  drivers/gpu/drm/panel/panel-lg-lg4573.c       |  8 +++---
> >  drivers/gpu/drm/panel/panel-lvds.c            |  4 +--
> >  drivers/gpu/drm/panel/panel-nec-nl8048hl11.c  |  4 +--
> >  drivers/gpu/drm/panel/panel-novatek-nt39016.c |  4 +--
> >  .../drm/panel/panel-olimex-lcd-olinuxino.c    |  4 +--
> >  .../gpu/drm/panel/panel-orisetech-otm8009a.c  |  9 ++++---
> >  .../drm/panel/panel-osd-osd101t2587-53ts.c    |  9 ++++---
> >  .../drm/panel/panel-panasonic-vvx10f034n00.c  |  9 ++++---
> >  .../drm/panel/panel-raspberrypi-touchscreen.c |  4 +--
> >  drivers/gpu/drm/panel/panel-raydium-rm67191.c |  6 ++---
> >  drivers/gpu/drm/panel/panel-raydium-rm68200.c |  9 ++++---
> >  .../drm/panel/panel-rocktech-jh057n00900.c    |  9 ++++---
> >  drivers/gpu/drm/panel/panel-ronbo-rb070d30.c  | 10 +++----
> >  drivers/gpu/drm/panel/panel-samsung-ld9040.c  |  4 +--
> >  drivers/gpu/drm/panel/panel-samsung-s6d16d0.c |  4 +--
> >  drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c |  4 +--
> >  .../gpu/drm/panel/panel-samsung-s6e63j0x03.c  |  4 +--
> >  drivers/gpu/drm/panel/panel-samsung-s6e63m0.c |  4 +--
> >  drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c |  4 +--
> >  drivers/gpu/drm/panel/panel-seiko-43wvf1g.c   |  9 ++++---
> >  .../gpu/drm/panel/panel-sharp-lq101r1sx01.c   |  9 ++++---
> >  .../gpu/drm/panel/panel-sharp-ls037v7dw01.c   |  4 +--
> >  .../gpu/drm/panel/panel-sharp-ls043t1le01.c   |  9 ++++---
> >  drivers/gpu/drm/panel/panel-simple.c          | 27 ++++++++++---------
> >  drivers/gpu/drm/panel/panel-sitronix-st7701.c |  9 ++++---
> >  .../gpu/drm/panel/panel-sitronix-st7789v.c    |  8 +++---
> >  drivers/gpu/drm/panel/panel-sony-acx565akm.c  |  4 +--
> >  drivers/gpu/drm/panel/panel-tpo-td028ttec1.c  |  4 +--
> >  drivers/gpu/drm/panel/panel-tpo-td043mtea1.c  |  4 +--
> >  drivers/gpu/drm/panel/panel-tpo-tpg110.c      |  4 +--
> >  drivers/gpu/drm/panel/panel-truly-nt35597.c   |  4 +--
> >  include/drm/drm_panel.h                       |  3 ++-
> >  41 files changed, 141 insertions(+), 130 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
> > index 35609c90e467..9927e28d93e6 100644
> > --- a/drivers/gpu/drm/drm_panel.c
> > +++ b/drivers/gpu/drm/drm_panel.c
> > @@ -252,7 +252,7 @@ int drm_panel_get_modes(struct drm_panel *panel)
> >  		return -EINVAL;
> >  
> >  	if (panel->funcs && panel->funcs->get_modes)
> > -		return panel->funcs->get_modes(panel);
> > +		return panel->funcs->get_modes(panel, panel->connector);
> >  
> >  	return 0;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-arm-versatile.c b/drivers/gpu/drm/panel/panel-arm-versatile.c
> > index a0574dc03e16..41aa91f60979 100644
> > --- a/drivers/gpu/drm/panel/panel-arm-versatile.c
> > +++ b/drivers/gpu/drm/panel/panel-arm-versatile.c
> > @@ -260,9 +260,9 @@ static int versatile_panel_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int versatile_panel_get_modes(struct drm_panel *panel)
> > +static int versatile_panel_get_modes(struct drm_panel *panel,
> > +				     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct versatile_panel *vpanel = to_versatile_panel(panel);
> >  	struct drm_display_mode *mode;
> >  
> > diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
> > index 98f184b81187..37d6b7390954 100644
> > --- a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
> > +++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
> > @@ -162,9 +162,9 @@ static const struct drm_display_mode feiyang_default_mode = {
> >  	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
> >  };
> >  
> > -static int feiyang_get_modes(struct drm_panel *panel)
> > +static int feiyang_get_modes(struct drm_panel *panel,
> > +			     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct feiyang *ctx = panel_to_feiyang(panel);
> >  	struct drm_display_mode *mode;
> >  
> > diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> > index 24955bec1958..8fd4c0521841 100644
> > --- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> > +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c
> > @@ -641,9 +641,9 @@ static const struct drm_display_mode itu_r_bt_656_720_mode = {
> >  	.flags = 0,
> >  };
> >  
> > -static int ili9322_get_modes(struct drm_panel *panel)
> > +static int ili9322_get_modes(struct drm_panel *panel,
> > +			     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct ili9322 *ili = panel_to_ili9322(panel);
> >  	struct drm_display_mode *mode;
> >  	struct drm_display_info *info;
> > @@ -655,7 +655,6 @@ static int ili9322_get_modes(struct drm_panel *panel)
> >  		info->bus_flags |= DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE;
> >  	else
> >  		info->bus_flags |= DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE;
> > -
> >  	if (ili->conf->de_active_high)
> >  		info->bus_flags |= DRM_BUS_FLAG_DE_HIGH;
> >  	else
> > diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> > index e8789e460a16..1c67a668d6bf 100644
> > --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> > +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> > @@ -387,9 +387,9 @@ static const struct drm_display_mode bananapi_default_mode = {
> >  	.vtotal		= 1280 + 10 + 10 + 20,
> >  };
> >  
> > -static int ili9881c_get_modes(struct drm_panel *panel)
> > +static int ili9881c_get_modes(struct drm_panel *panel,
> > +			      struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct ili9881c *ctx = panel_to_ili9881c(panel);
> >  	struct drm_display_mode *mode;
> >  
> > @@ -407,8 +407,8 @@ static int ili9881c_get_modes(struct drm_panel *panel)
> >  	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> >  	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 62;
> > -	panel->connector->display_info.height_mm = 110;
> > +	connector->display_info.width_mm = 62;
> > +	connector->display_info.height_mm = 110;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > index 83df1ac4211f..facf1bab2532 100644
> > --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> > @@ -403,7 +403,8 @@ static const struct panel_desc innolux_p097pfg_panel_desc = {
> >  	.sleep_mode_delay = 100, /* T15 */
> >  };
> >  
> > -static int innolux_panel_get_modes(struct drm_panel *panel)
> > +static int innolux_panel_get_modes(struct drm_panel *panel,
> > +				   struct drm_connector *connector)
> >  {
> >  	struct innolux_panel *innolux = to_innolux_panel(panel);
> >  	const struct drm_display_mode *m = innolux->desc->mode;
> > @@ -418,13 +419,11 @@ static int innolux_panel_get_modes(struct drm_panel *panel)
> >  
> >  	drm_mode_set_name(mode);
> >  
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm =
> > -			innolux->desc->size.width;
> > -	panel->connector->display_info.height_mm =
> > -			innolux->desc->size.height;
> > -	panel->connector->display_info.bpc = innolux->desc->bpc;
> > +	connector->display_info.width_mm = innolux->desc->size.width;
> > +	connector->display_info.height_mm = innolux->desc->size.height;
> > +	connector->display_info.bpc = innolux->desc->bpc;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
> > index 56364a93f0b8..e6b650a64fdb 100644
> > --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
> > +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
> > @@ -300,7 +300,8 @@ static const struct drm_display_mode default_mode = {
> >  		.flags = 0,
> >  };
> >  
> > -static int jdi_panel_get_modes(struct drm_panel *panel)
> > +static int jdi_panel_get_modes(struct drm_panel *panel,
> > +			       struct drm_connector *connector)
> >  {
> >  	struct drm_display_mode *mode;
> >  	struct jdi_panel *jdi = to_jdi_panel(panel);
> > @@ -316,10 +317,10 @@ static int jdi_panel_get_modes(struct drm_panel *panel)
> >  
> >  	drm_mode_set_name(mode);
> >  
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 95;
> > -	panel->connector->display_info.height_mm = 151;
> > +	connector->display_info.width_mm = 95;
> > +	connector->display_info.height_mm = 151;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
> > index 45f96556ec8c..e6f53d56daf9 100644
> > --- a/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
> > +++ b/drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c
> > @@ -333,7 +333,8 @@ static const struct drm_display_mode default_mode = {
> >  	.vrefresh = 60,
> >  };
> >  
> > -static int kingdisplay_panel_get_modes(struct drm_panel *panel)
> > +static int kingdisplay_panel_get_modes(struct drm_panel *panel,
> > +				       struct drm_connector *connector)
> >  {
> >  	struct drm_display_mode *mode;
> >  
> > @@ -347,11 +348,11 @@ static int kingdisplay_panel_get_modes(struct drm_panel *panel)
> >  
> >  	drm_mode_set_name(mode);
> >  
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 147;
> > -	panel->connector->display_info.height_mm = 196;
> > -	panel->connector->display_info.bpc = 8;
> > +	connector->display_info.width_mm = 147;
> > +	connector->display_info.height_mm = 196;
> > +	connector->display_info.bpc = 8;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-lg-lb035q02.c b/drivers/gpu/drm/panel/panel-lg-lb035q02.c
> > index 7a1385e834f0..7a3bd4d80c79 100644
> > --- a/drivers/gpu/drm/panel/panel-lg-lb035q02.c
> > +++ b/drivers/gpu/drm/panel/panel-lg-lb035q02.c
> > @@ -141,9 +141,9 @@ static const struct drm_display_mode lb035q02_mode = {
> >  	.height_mm = 53,
> >  };
> >  
> > -static int lb035q02_get_modes(struct drm_panel *panel)
> > +static int lb035q02_get_modes(struct drm_panel *panel,
> > +			      struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &lb035q02_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-lg-lg4573.c b/drivers/gpu/drm/panel/panel-lg-lg4573.c
> > index db4865a4c2b9..fc6572b4e2f9 100644
> > --- a/drivers/gpu/drm/panel/panel-lg-lg4573.c
> > +++ b/drivers/gpu/drm/panel/panel-lg-lg4573.c
> > @@ -209,9 +209,9 @@ static const struct drm_display_mode default_mode = {
> >  	.vrefresh = 60,
> >  };
> >  
> > -static int lg4573_get_modes(struct drm_panel *panel)
> > +static int lg4573_get_modes(struct drm_panel *panel,
> > +			    struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &default_mode);
> > @@ -227,8 +227,8 @@ static int lg4573_get_modes(struct drm_panel *panel)
> >  	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> >  	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 61;
> > -	panel->connector->display_info.height_mm = 103;
> > +	connector->display_info.width_mm = 61;
> > +	connector->display_info.height_mm = 103;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c
> > index 2405f26e5d31..f6d58a60e514 100644
> > --- a/drivers/gpu/drm/panel/panel-lvds.c
> > +++ b/drivers/gpu/drm/panel/panel-lvds.c
> > @@ -106,10 +106,10 @@ static int panel_lvds_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int panel_lvds_get_modes(struct drm_panel *panel)
> > +static int panel_lvds_get_modes(struct drm_panel *panel,
> > +				struct drm_connector *connector)
> >  {
> >  	struct panel_lvds *lvds = to_panel_lvds(panel);
> > -	struct drm_connector *connector = lvds->panel.connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_create(lvds->panel.drm);
> > diff --git a/drivers/gpu/drm/panel/panel-nec-nl8048hl11.c b/drivers/gpu/drm/panel/panel-nec-nl8048hl11.c
> > index fd593532ab23..a6ccdb09aace 100644
> > --- a/drivers/gpu/drm/panel/panel-nec-nl8048hl11.c
> > +++ b/drivers/gpu/drm/panel/panel-nec-nl8048hl11.c
> > @@ -123,9 +123,9 @@ static const struct drm_display_mode nl8048_mode = {
> >  	.height_mm = 53,
> >  };
> >  
> > -static int nl8048_get_modes(struct drm_panel *panel)
> > +static int nl8048_get_modes(struct drm_panel *panel,
> > +			    struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &nl8048_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-novatek-nt39016.c b/drivers/gpu/drm/panel/panel-novatek-nt39016.c
> > index 60ccedce530c..91ea49c05611 100644
> > --- a/drivers/gpu/drm/panel/panel-novatek-nt39016.c
> > +++ b/drivers/gpu/drm/panel/panel-novatek-nt39016.c
> > @@ -206,11 +206,11 @@ static int nt39016_disable(struct drm_panel *drm_panel)
> >  	return 0;
> >  }
> >  
> > -static int nt39016_get_modes(struct drm_panel *drm_panel)
> > +static int nt39016_get_modes(struct drm_panel *drm_panel,
> > +			     struct drm_connector *connector)
> >  {
> >  	struct nt39016 *panel = to_nt39016(drm_panel);
> >  	const struct nt39016_panel_info *panel_info = panel->panel_info;
> > -	struct drm_connector *connector = drm_panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(drm_panel->drm, &panel_info->display_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
> > index 8738ef1b66dc..2b7e0dfebc5e 100644
> > --- a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
> > +++ b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c
> > @@ -141,10 +141,10 @@ static int lcd_olinuxino_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int lcd_olinuxino_get_modes(struct drm_panel *panel)
> > +static int lcd_olinuxino_get_modes(struct drm_panel *panel,
> > +				   struct drm_connector *connector)
> >  {
> >  	struct lcd_olinuxino *lcd = to_lcd_olinuxino(panel);
> > -	struct drm_connector *connector = lcd->panel.connector;
> >  	struct lcd_olinuxino_info *lcd_info = &lcd->eeprom.info;
> >  	struct drm_device *drm = lcd->panel.drm;
> >  	struct lcd_olinuxino_mode *lcd_mode;
> > diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> > index bf1f928b215f..4e1606c79072 100644
> > --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> > +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> > @@ -349,7 +349,8 @@ static int otm8009a_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int otm8009a_get_modes(struct drm_panel *panel)
> > +static int otm8009a_get_modes(struct drm_panel *panel,
> > +			      struct drm_connector *connector)
> >  {
> >  	struct drm_display_mode *mode;
> >  
> > @@ -364,10 +365,10 @@ static int otm8009a_get_modes(struct drm_panel *panel)
> >  	drm_mode_set_name(mode);
> >  
> >  	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = mode->width_mm;
> > -	panel->connector->display_info.height_mm = mode->height_mm;
> > +	connector->display_info.width_mm = mode->width_mm;
> > +	connector->display_info.height_mm = mode->height_mm;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c b/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
> > index 2b40913899d8..b3e010288c10 100644
> > --- a/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
> > +++ b/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
> > @@ -112,7 +112,8 @@ static const struct drm_display_mode default_mode_osd101t2587 = {
> >  	.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
> >  };
> >  
> > -static int osd101t2587_panel_get_modes(struct drm_panel *panel)
> > +static int osd101t2587_panel_get_modes(struct drm_panel *panel,
> > +				       struct drm_connector *connector)
> >  {
> >  	struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
> >  	struct drm_display_mode *mode;
> > @@ -128,10 +129,10 @@ static int osd101t2587_panel_get_modes(struct drm_panel *panel)
> >  
> >  	drm_mode_set_name(mode);
> >  
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 217;
> > -	panel->connector->display_info.height_mm = 136;
> > +	connector->display_info.width_mm = 217;
> > +	connector->display_info.height_mm = 136;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> > index 664605071d34..19a6eb4637c8 100644
> > --- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> > +++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
> > @@ -166,7 +166,8 @@ static const struct drm_display_mode default_mode = {
> >  	.vrefresh = 60,
> >  };
> >  
> > -static int wuxga_nt_panel_get_modes(struct drm_panel *panel)
> > +static int wuxga_nt_panel_get_modes(struct drm_panel *panel,
> > +				    struct drm_connector *connector)
> >  {
> >  	struct drm_display_mode *mode;
> >  
> > @@ -180,10 +181,10 @@ static int wuxga_nt_panel_get_modes(struct drm_panel *panel)
> >  
> >  	drm_mode_set_name(mode);
> >  
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 217;
> > -	panel->connector->display_info.height_mm = 136;
> > +	connector->display_info.width_mm = 217;
> > +	connector->display_info.height_mm = 136;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
> > index 09824e92fc78..732b7111395e 100644
> > --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
> > +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
> > @@ -311,9 +311,9 @@ static int rpi_touchscreen_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int rpi_touchscreen_get_modes(struct drm_panel *panel)
> > +static int rpi_touchscreen_get_modes(struct drm_panel *panel,
> > +				     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_device *drm = panel->drm;
> >  	unsigned int i, num = 0;
> >  	static const u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24;
> > diff --git a/drivers/gpu/drm/panel/panel-raydium-rm67191.c b/drivers/gpu/drm/panel/panel-raydium-rm67191.c
> > index fd67fc6185c4..123bb68cfcb7 100644
> > --- a/drivers/gpu/drm/panel/panel-raydium-rm67191.c
> > +++ b/drivers/gpu/drm/panel/panel-raydium-rm67191.c
> > @@ -436,9 +436,9 @@ static int rad_panel_disable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int rad_panel_get_modes(struct drm_panel *panel)
> > +static int rad_panel_get_modes(struct drm_panel *panel,
> > +			       struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &default_mode);
> > @@ -451,7 +451,7 @@ static int rad_panel_get_modes(struct drm_panel *panel)
> >  
> >  	drm_mode_set_name(mode);
> >  	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> >  	connector->display_info.width_mm = mode->width_mm;
> >  	connector->display_info.height_mm = mode->height_mm;
> > diff --git a/drivers/gpu/drm/panel/panel-raydium-rm68200.c b/drivers/gpu/drm/panel/panel-raydium-rm68200.c
> > index 994e855721f4..66fa975308ec 100644
> > --- a/drivers/gpu/drm/panel/panel-raydium-rm68200.c
> > +++ b/drivers/gpu/drm/panel/panel-raydium-rm68200.c
> > @@ -335,7 +335,8 @@ static int rm68200_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int rm68200_get_modes(struct drm_panel *panel)
> > +static int rm68200_get_modes(struct drm_panel *panel,
> > +			     struct drm_connector *connector)
> >  {
> >  	struct drm_display_mode *mode;
> >  
> > @@ -350,10 +351,10 @@ static int rm68200_get_modes(struct drm_panel *panel)
> >  	drm_mode_set_name(mode);
> >  
> >  	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = mode->width_mm;
> > -	panel->connector->display_info.height_mm = mode->height_mm;
> > +	connector->display_info.width_mm = mode->width_mm;
> > +	connector->display_info.height_mm = mode->height_mm;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c
> > index 31234b79d3b1..b2d61cab3cad 100644
> > --- a/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c
> > +++ b/drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c
> > @@ -230,7 +230,8 @@ static const struct drm_display_mode default_mode = {
> >  	.height_mm   = 130,
> >  };
> >  
> > -static int jh057n_get_modes(struct drm_panel *panel)
> > +static int jh057n_get_modes(struct drm_panel *panel,
> > +			    struct drm_connector *connector)
> >  {
> >  	struct jh057n *ctx = panel_to_jh057n(panel);
> >  	struct drm_display_mode *mode;
> > @@ -246,9 +247,9 @@ static int jh057n_get_modes(struct drm_panel *panel)
> >  	drm_mode_set_name(mode);
> >  
> >  	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> > -	panel->connector->display_info.width_mm = mode->width_mm;
> > -	panel->connector->display_info.height_mm = mode->height_mm;
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	connector->display_info.width_mm = mode->width_mm;
> > +	connector->display_info.height_mm = mode->height_mm;
> > +	drm_mode_probed_add(connector, mode);
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> > index 170a5cda21b9..57a462ce221e 100644
> > --- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> > +++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> > @@ -120,9 +120,9 @@ static const struct drm_display_mode default_mode = {
> >  	.height_mm	= 85,
> >  };
> >  
> > -static int rb070d30_panel_get_modes(struct drm_panel *panel)
> > +static int rb070d30_panel_get_modes(struct drm_panel *panel,
> > +				    struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
> >  	struct drm_display_mode *mode;
> >  	static const u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24;
> > @@ -140,9 +140,9 @@ static int rb070d30_panel_get_modes(struct drm_panel *panel)
> >  	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> >  	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.bpc = 8;
> > -	panel->connector->display_info.width_mm = mode->width_mm;
> > -	panel->connector->display_info.height_mm = mode->height_mm;
> > +	connector->display_info.bpc = 8;
> > +	connector->display_info.width_mm = mode->width_mm;
> > +	connector->display_info.height_mm = mode->height_mm;
> >  	drm_display_info_set_bus_formats(&connector->display_info,
> >  					 &bus_format, 1);
> >  
> > diff --git a/drivers/gpu/drm/panel/panel-samsung-ld9040.c b/drivers/gpu/drm/panel/panel-samsung-ld9040.c
> > index 250809ba37c7..3c52f15f7a1c 100644
> > --- a/drivers/gpu/drm/panel/panel-samsung-ld9040.c
> > +++ b/drivers/gpu/drm/panel/panel-samsung-ld9040.c
> > @@ -261,9 +261,9 @@ static int ld9040_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int ld9040_get_modes(struct drm_panel *panel)
> > +static int ld9040_get_modes(struct drm_panel *panel,
> > +			    struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct ld9040 *ctx = panel_to_ld9040(panel);
> >  	struct drm_display_mode *mode;
> >  
> > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c
> > index e3a0397e953e..71939ab757b1 100644
> > --- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c
> > +++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c
> > @@ -143,9 +143,9 @@ static int s6d16d0_disable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int s6d16d0_get_modes(struct drm_panel *panel)
> > +static int s6d16d0_get_modes(struct drm_panel *panel,
> > +			     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &samsung_s6d16d0_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
> > index 938ab72c5540..8e0236ba6145 100644
> > --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
> > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
> > @@ -645,9 +645,9 @@ static const struct s6e3ha2_panel_desc samsung_s6e3hf2 = {
> >  	.type = HF2_TYPE,
> >  };
> >  
> > -static int s6e3ha2_get_modes(struct drm_panel *panel)
> > +static int s6e3ha2_get_modes(struct drm_panel *panel,
> > +			     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct s6e3ha2 *ctx = container_of(panel, struct s6e3ha2, panel);
> >  	struct drm_display_mode *mode;
> >  
> > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c
> > index a60635e9226d..c939d5bde4f0 100644
> > --- a/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c
> > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c
> > @@ -400,9 +400,9 @@ static int s6e63j0x03_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int s6e63j0x03_get_modes(struct drm_panel *panel)
> > +static int s6e63j0x03_get_modes(struct drm_panel *panel,
> > +				struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &default_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c
> > index ba01af0b14fd..1d099092e754 100644
> > --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c
> > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c
> > @@ -362,9 +362,9 @@ static int s6e63m0_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int s6e63m0_get_modes(struct drm_panel *panel)
> > +static int s6e63m0_get_modes(struct drm_panel *panel,
> > +			     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &default_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c
> > index dbced6501204..8a028d2bd0d6 100644
> > --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c
> > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c
> > @@ -920,9 +920,9 @@ static int s6e8aa0_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int s6e8aa0_get_modes(struct drm_panel *panel)
> > +static int s6e8aa0_get_modes(struct drm_panel *panel,
> > +			     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct s6e8aa0 *ctx = panel_to_s6e8aa0(panel);
> >  	struct drm_display_mode *mode;
> >  
> > diff --git a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c
> > index b3619ba443bd..b878930b17e4 100644
> > --- a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c
> > +++ b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c
> > @@ -56,9 +56,9 @@ static inline struct seiko_panel *to_seiko_panel(struct drm_panel *panel)
> >  	return container_of(panel, struct seiko_panel, base);
> >  }
> >  
> > -static int seiko_panel_get_fixed_modes(struct seiko_panel *panel)
> > +static int seiko_panel_get_fixed_modes(struct seiko_panel *panel,
> > +				       struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->base.connector;
> >  	struct drm_device *drm = panel->base.drm;
> >  	struct drm_display_mode *mode;
> >  	unsigned int i, num = 0;
> > @@ -208,12 +208,13 @@ static int seiko_panel_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int seiko_panel_get_modes(struct drm_panel *panel)
> > +static int seiko_panel_get_modes(struct drm_panel *panel,
> > +				 struct drm_connector *connector)
> >  {
> >  	struct seiko_panel *p = to_seiko_panel(panel);
> >  
> >  	/* add hard-coded panel modes */
> > -	return seiko_panel_get_fixed_modes(p);
> > +	return seiko_panel_get_fixed_modes(p, connector);
> >  }
> >  
> >  static int seiko_panel_get_timings(struct drm_panel *panel,
> > diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> > index 5e136c3ba185..e797b700661a 100644
> > --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> > +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
> > @@ -278,7 +278,8 @@ static const struct drm_display_mode default_mode = {
> >  	.vrefresh = 60,
> >  };
> >  
> > -static int sharp_panel_get_modes(struct drm_panel *panel)
> > +static int sharp_panel_get_modes(struct drm_panel *panel,
> > +				 struct drm_connector *connector)
> >  {
> >  	struct drm_display_mode *mode;
> >  
> > @@ -292,10 +293,10 @@ static int sharp_panel_get_modes(struct drm_panel *panel)
> >  
> >  	drm_mode_set_name(mode);
> >  
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 217;
> > -	panel->connector->display_info.height_mm = 136;
> > +	connector->display_info.width_mm = 217;
> > +	connector->display_info.height_mm = 136;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-sharp-ls037v7dw01.c b/drivers/gpu/drm/panel/panel-sharp-ls037v7dw01.c
> > index eeab7998c7de..7103a945f0e8 100644
> > --- a/drivers/gpu/drm/panel/panel-sharp-ls037v7dw01.c
> > +++ b/drivers/gpu/drm/panel/panel-sharp-ls037v7dw01.c
> > @@ -100,9 +100,9 @@ static const struct drm_display_mode ls037v7dw01_mode = {
> >  	.height_mm = 75,
> >  };
> >  
> > -static int ls037v7dw01_get_modes(struct drm_panel *panel)
> > +static int ls037v7dw01_get_modes(struct drm_panel *panel,
> > +				 struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &ls037v7dw01_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c
> > index b963ba4ab589..85ae6cffdbfb 100644
> > --- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c
> > +++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c
> > @@ -210,7 +210,8 @@ static const struct drm_display_mode default_mode = {
> >  	.vrefresh = 60,
> >  };
> >  
> > -static int sharp_nt_panel_get_modes(struct drm_panel *panel)
> > +static int sharp_nt_panel_get_modes(struct drm_panel *panel,
> > +				    struct drm_connector *connector)
> >  {
> >  	struct drm_display_mode *mode;
> >  
> > @@ -224,10 +225,10 @@ static int sharp_nt_panel_get_modes(struct drm_panel *panel)
> >  
> >  	drm_mode_set_name(mode);
> >  
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 54;
> > -	panel->connector->display_info.height_mm = 95;
> > +	connector->display_info.width_mm = 54;
> > +	connector->display_info.height_mm = 95;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > index a5df6d6dd455..d6299fe6d276 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -117,9 +117,9 @@ static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
> >  	return container_of(panel, struct panel_simple, base);
> >  }
> >  
> > -static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel)
> > +static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel,
> > +						   struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->base.connector;
> >  	struct drm_device *drm = panel->base.drm;
> >  	struct drm_display_mode *mode;
> >  	unsigned int i, num = 0;
> > @@ -150,9 +150,9 @@ static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel)
> >  	return num;
> >  }
> >  
> > -static unsigned int panel_simple_get_display_modes(struct panel_simple *panel)
> > +static unsigned int panel_simple_get_display_modes(struct panel_simple *panel,
> > +						   struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->base.connector;
> >  	struct drm_device *drm = panel->base.drm;
> >  	struct drm_display_mode *mode;
> >  	unsigned int i, num = 0;
> > @@ -181,9 +181,9 @@ static unsigned int panel_simple_get_display_modes(struct panel_simple *panel)
> >  	return num;
> >  }
> >  
> > -static int panel_simple_get_non_edid_modes(struct panel_simple *panel)
> > +static int panel_simple_get_non_edid_modes(struct panel_simple *panel,
> > +					   struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->base.connector;
> >  	struct drm_device *drm = panel->base.drm;
> >  	struct drm_display_mode *mode;
> >  	bool has_override = panel->override_mode.type;
> > @@ -204,7 +204,7 @@ static int panel_simple_get_non_edid_modes(struct panel_simple *panel)
> >  
> >  	/* Only add timings if override was not there or failed to validate */
> >  	if (num == 0 && panel->desc->num_timings)
> > -		num = panel_simple_get_timings_modes(panel);
> > +		num = panel_simple_get_timings_modes(panel, connector);
> >  
> >  	/*
> >  	 * Only add fixed modes if timings/override added no mode.
> > @@ -214,7 +214,7 @@ static int panel_simple_get_non_edid_modes(struct panel_simple *panel)
> >  	 */
> >  	WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
> >  	if (num == 0)
> > -		num = panel_simple_get_display_modes(panel);
> > +		num = panel_simple_get_display_modes(panel, connector);
> >  
> >  	connector->display_info.bpc = panel->desc->bpc;
> >  	connector->display_info.width_mm = panel->desc->size.width;
> > @@ -304,23 +304,24 @@ static int panel_simple_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int panel_simple_get_modes(struct drm_panel *panel)
> > +static int panel_simple_get_modes(struct drm_panel *panel,
> > +				  struct drm_connector *connector)
> >  {
> >  	struct panel_simple *p = to_panel_simple(panel);
> >  	int num = 0;
> >  
> >  	/* probe EDID if a DDC bus is available */
> >  	if (p->ddc) {
> > -		struct edid *edid = drm_get_edid(panel->connector, p->ddc);
> > -		drm_connector_update_edid_property(panel->connector, edid);
> > +		struct edid *edid = drm_get_edid(connector, p->ddc);
> > +		drm_connector_update_edid_property(connector, edid);
> >  		if (edid) {
> > -			num += drm_add_edid_modes(panel->connector, edid);
> > +			num += drm_add_edid_modes(connector, edid);
> >  			kfree(edid);
> >  		}
> >  	}
> >  
> >  	/* add hard-coded panel modes */
> > -	num += panel_simple_get_non_edid_modes(p);
> > +	num += panel_simple_get_non_edid_modes(p, connector);
> >  
> >  	return num;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
> > index ee3f23f45755..3ed3b1d6d82d 100644
> > --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c
> > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
> > @@ -264,7 +264,8 @@ static int st7701_unprepare(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int st7701_get_modes(struct drm_panel *panel)
> > +static int st7701_get_modes(struct drm_panel *panel,
> > +			    struct drm_connector *connector)
> >  {
> >  	struct st7701 *st7701 = panel_to_st7701(panel);
> >  	const struct drm_display_mode *desc_mode = st7701->desc->mode;
> > @@ -280,10 +281,10 @@ static int st7701_get_modes(struct drm_panel *panel)
> >  	}
> >  
> >  	drm_mode_set_name(mode);
> > -	drm_mode_probed_add(panel->connector, mode);
> > +	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = desc_mode->width_mm;
> > -	panel->connector->display_info.height_mm = desc_mode->height_mm;
> > +	connector->display_info.width_mm = desc_mode->width_mm;
> > +	connector->display_info.height_mm = desc_mode->height_mm;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> > index 108a85bb6667..836b01331505 100644
> > --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> > @@ -170,9 +170,9 @@ static const struct drm_display_mode default_mode = {
> >  	.vrefresh = 60,
> >  };
> >  
> > -static int st7789v_get_modes(struct drm_panel *panel)
> > +static int st7789v_get_modes(struct drm_panel *panel,
> > +			     struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &default_mode);
> > @@ -188,8 +188,8 @@ static int st7789v_get_modes(struct drm_panel *panel)
> >  	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> >  	drm_mode_probed_add(connector, mode);
> >  
> > -	panel->connector->display_info.width_mm = 61;
> > -	panel->connector->display_info.height_mm = 103;
> > +	connector->display_info.width_mm = 61;
> > +	connector->display_info.height_mm = 103;
> >  
> >  	return 1;
> >  }
> > diff --git a/drivers/gpu/drm/panel/panel-sony-acx565akm.c b/drivers/gpu/drm/panel/panel-sony-acx565akm.c
> > index d6387d8f88a3..841dc73c443d 100644
> > --- a/drivers/gpu/drm/panel/panel-sony-acx565akm.c
> > +++ b/drivers/gpu/drm/panel/panel-sony-acx565akm.c
> > @@ -521,9 +521,9 @@ static const struct drm_display_mode acx565akm_mode = {
> >  	.height_mm = 46,
> >  };
> >  
> > -static int acx565akm_get_modes(struct drm_panel *panel)
> > +static int acx565akm_get_modes(struct drm_panel *panel,
> > +			       struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &acx565akm_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c b/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
> > index c44d6a65c0aa..5230176bd8e6 100644
> > --- a/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
> > +++ b/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c
> > @@ -287,9 +287,9 @@ static const struct drm_display_mode td028ttec1_mode = {
> >  	.height_mm = 58,
> >  };
> >  
> > -static int td028ttec1_get_modes(struct drm_panel *panel)
> > +static int td028ttec1_get_modes(struct drm_panel *panel,
> > +				struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &td028ttec1_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c b/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
> > index 621b65feec07..716f8ed1cc45 100644
> > --- a/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
> > +++ b/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
> > @@ -346,9 +346,9 @@ static const struct drm_display_mode td043mtea1_mode = {
> >  	.height_mm = 56,
> >  };
> >  
> > -static int td043mtea1_get_modes(struct drm_panel *panel)
> > +static int td043mtea1_get_modes(struct drm_panel *panel,
> > +				struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct drm_display_mode *mode;
> >  
> >  	mode = drm_mode_duplicate(panel->drm, &td043mtea1_mode);
> > diff --git a/drivers/gpu/drm/panel/panel-tpo-tpg110.c b/drivers/gpu/drm/panel/panel-tpo-tpg110.c
> > index 1a5418ae2ccf..e74cd9d418cf 100644
> > --- a/drivers/gpu/drm/panel/panel-tpo-tpg110.c
> > +++ b/drivers/gpu/drm/panel/panel-tpo-tpg110.c
> > @@ -384,9 +384,9 @@ static int tpg110_enable(struct drm_panel *panel)
> >   * presents the mode that is configured for the system under use,
> >   * and which is detected by reading the registers of the display.
> >   */
> > -static int tpg110_get_modes(struct drm_panel *panel)
> > +static int tpg110_get_modes(struct drm_panel *panel,
> > +			    struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct tpg110 *tpg = to_tpg110(panel);
> >  	struct drm_display_mode *mode;
> >  
> > diff --git a/drivers/gpu/drm/panel/panel-truly-nt35597.c b/drivers/gpu/drm/panel/panel-truly-nt35597.c
> > index 0feea2456e14..012ca62bf30e 100644
> > --- a/drivers/gpu/drm/panel/panel-truly-nt35597.c
> > +++ b/drivers/gpu/drm/panel/panel-truly-nt35597.c
> > @@ -454,9 +454,9 @@ static int truly_nt35597_enable(struct drm_panel *panel)
> >  	return 0;
> >  }
> >  
> > -static int truly_nt35597_get_modes(struct drm_panel *panel)
> > +static int truly_nt35597_get_modes(struct drm_panel *panel,
> > +				   struct drm_connector *connector)
> >  {
> > -	struct drm_connector *connector = panel->connector;
> >  	struct truly_nt35597 *ctx = panel_to_ctx(panel);
> >  	struct drm_display_mode *mode;
> >  	const struct nt35597_config *config;
> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> > index d30c98567384..a5f7199807f2 100644
> > --- a/include/drm/drm_panel.h
> > +++ b/include/drm/drm_panel.h
> > @@ -100,7 +100,8 @@ struct drm_panel_funcs {
> >  	 * Add modes to the connector that the panel is attached to and
> >  	 * return the number of modes added.
> >  	 */
> > -	int (*get_modes)(struct drm_panel *panel);
> > +	int (*get_modes)(struct drm_panel *panel,
> > +			 struct drm_connector *connector);
> >  
> >  	/**
> >  	 * @get_timings:

-- 
Regards,

Laurent Pinchart

  reply index

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 19:32 [PATCH v1 0/26] drm/panel infrastructure + backlight update Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 01/26] drm/drm_panel: no error when no callback Sam Ravnborg
2019-12-03  6:24   ` Laurent Pinchart
2019-12-02 19:32 ` [PATCH v1 02/26] drm/panel: add backlight support Sam Ravnborg
2019-12-03  6:32   ` Laurent Pinchart
2019-12-02 19:32 ` [PATCH v1 03/26] drm/panel: simple: use drm_panel " Sam Ravnborg
2019-12-03  6:39   ` Laurent Pinchart
2019-12-02 19:32 ` [PATCH v1 04/26] drm: get drm_bridge_panel connector via helper Sam Ravnborg
2019-12-03  6:44   ` Laurent Pinchart
2019-12-03 13:22   ` Linus Walleij
2019-12-02 19:32 ` [PATCH v1 05/26] drm/panel: add drm_connector argument to get_modes() Sam Ravnborg
2019-12-03  6:50   ` Laurent Pinchart
2019-12-03 13:25   ` Linus Walleij
2019-12-04 12:08   ` Guido Günther
2019-12-04 13:11     ` Laurent Pinchart [this message]
2019-12-02 19:32 ` [PATCH v1 07/26] drm/panel: remove get_timings Sam Ravnborg
2019-12-03  7:02   ` Laurent Pinchart
2019-12-03  7:46   ` Maxime Ripard
2019-12-03  8:18     ` Laurent Pinchart
2019-12-03  8:39     ` Sam Ravnborg
2019-12-04  8:05       ` Maxime Ripard
2019-12-03 15:20     ` Linus Walleij
2019-12-04  8:16       ` Maxime Ripard
2019-12-04  8:23         ` Laurent Pinchart
2019-12-10 21:33         ` Linus Walleij
2019-12-02 19:32 ` [PATCH v1 08/26] drm/panel: drop drm_device from drm_panel Sam Ravnborg
2019-12-03  7:15   ` Laurent Pinchart
2019-12-03 13:27   ` Linus Walleij
2019-12-02 19:32 ` [PATCH v1 09/26] drm/panel: feiyang-fy07024di26a30d: use drm_panel backlight support Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 10/26] drm/panel: ilitek-ili9881c: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 11/26] drm/panel: innolux-p079zca: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 12/26] drm/panel: kingdisplay-kd097d04: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 13/26] drm/panel: lvds: " Sam Ravnborg
2019-12-03  7:16   ` Laurent Pinchart
2019-12-02 19:32 ` [PATCH v1 14/26] drm/panel: olimex-lcd-olinuxino: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 15/26] drm/panel: osd-osd101t2587-53ts: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 16/26] drm/panel: panasonic-vvx10f034n00: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 17/26] drm/panel: raydium-rm68200: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 18/26] drm/panel: rocktech-jh057n00900: " Sam Ravnborg
2019-12-04 12:04   ` Guido Günther
2019-12-02 19:32 ` [PATCH v1 19/26] drm/panel: ronbo-rb070d30: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 20/26] drm/panel: seiko-43wvf1g: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 21/26] drm/panel: sharp-lq101r1sx01: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 22/26] drm/panel: sharp-ls043t1le01: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 23/26] drm/panel: sitronix-st7701: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 24/26] drm/panel: sitronix-st7789v: " Sam Ravnborg
2019-12-02 19:32 ` [PATCH v1 25/26] drm/panel: tpo-td028ttec1: " Sam Ravnborg
2019-12-03  7:16   ` Laurent Pinchart
2019-12-02 19:32 ` [PATCH v1 26/26] drm/panel: tpo-tpg110: " Sam Ravnborg
2019-12-03 13:20   ` Linus Walleij
2019-12-02 19:59 ` [PATCH v1 0/26] drm/panel infrastructure + backlight update Jeffrey Hugo
2019-12-02 20:48   ` Sam Ravnborg
2019-12-02 20:51     ` Jeffrey Hugo
2019-12-03  7:24 ` Laurent Pinchart
2019-12-03  8:33   ` Sam Ravnborg

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204131102.GA4852@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=abhinavk@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=benjamin.gaignard@linaro.org \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=guido.gunther@puri.sm \
    --cc=jagan@amarulasolutions.com \
    --cc=jitao.shi@mediatek.com \
    --cc=kernel@pengutronix.de \
    --cc=kernel@puri.sm \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robert.chiras@nxp.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=stefan@agner.ch \
    --cc=stefan@olimex.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Renesas-SoC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-renesas-soc/0 linux-renesas-soc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-renesas-soc linux-renesas-soc/ https://lore.kernel.org/linux-renesas-soc \
		linux-renesas-soc@vger.kernel.org
	public-inbox-index linux-renesas-soc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-renesas-soc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git