On Mon, Jan 31, 2022 at 09:12:21PM +0100, Javier Martinez Canillas wrote: > There isn't a connector type for display controllers accesed through I2C, > most drivers use DRM_MODE_CONNECTOR_Unknown or DRM_MODE_CONNECTOR_VIRTUAL. > > Add an I2C connector type to match the actual connector. > > As Noralf Trønnes mentions in commit fc06bf1d76d6 ("drm: Add SPI connector > type"), user-space should be able to cope with a connector type that does > not yet understand. > > Tested with `modetest -M ssd1307 -c` and shows the connector as unknown-1. I had expected unknown-21?? > > Signed-off-by: Javier Martinez Canillas <javierm@xxxxxxxxxx> Reviewed-by: Sam Ravnborg <sam@xxxxxxxxxxxx> > --- > > drivers/gpu/drm/drm_connector.c | 1 + > include/uapi/drm/drm_mode.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c > index a50c82bc2b2f..975a7525a508 100644 > --- a/drivers/gpu/drm/drm_connector.c > +++ b/drivers/gpu/drm/drm_connector.c > @@ -105,6 +105,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = { > { DRM_MODE_CONNECTOR_WRITEBACK, "Writeback" }, > { DRM_MODE_CONNECTOR_SPI, "SPI" }, > { DRM_MODE_CONNECTOR_USB, "USB" }, > + { DRM_MODE_CONNECTOR_I2C, "I2C" }, > }; > > void drm_connector_ida_init(void) > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h > index e1e351682872..d6d6288242db 100644 > --- a/include/uapi/drm/drm_mode.h > +++ b/include/uapi/drm/drm_mode.h > @@ -421,6 +421,7 @@ enum drm_mode_subconnector { > #define DRM_MODE_CONNECTOR_WRITEBACK 18 > #define DRM_MODE_CONNECTOR_SPI 19 > #define DRM_MODE_CONNECTOR_USB 20 > +#define DRM_MODE_CONNECTOR_I2C 21 > > /** > * struct drm_mode_get_connector - Get connector metadata. > -- > 2.34.1