dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/dp: Set the connector's TILE property even for DP SST connectors
@ 2019-03-13  2:17 Manasi Navare
  2019-03-13 18:48 ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Manasi Navare @ 2019-03-13  2:17 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Dave Airlie, Daniel Vetter

Current driver sets the tile property only for DP MST connectors.
However there are some tiled displays where each SST connector
carries a single tile. So we need to attach this property object
for every connector and set it for every connector (DP SST and MST).
Plus since the tile information is obtained as a result of EDID
parsing, the best place to update tile property is where we update
edid property.
Also now we dont need to explicitly set this now for MST connectors.

This has been tested with xrandr --props and modetest and verified
that TILE property is exposed correctly.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 drivers/gpu/drm/drm_connector.c       | 13 ++++++++++++-
 drivers/gpu/drm/drm_dp_mst_topology.c |  1 -
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 07d65a16c623..2355124849db 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -245,6 +245,7 @@ int drm_connector_init(struct drm_device *dev,
 	INIT_LIST_HEAD(&connector->modes);
 	mutex_init(&connector->mutex);
 	connector->edid_blob_ptr = NULL;
+	connector->tile_blob_ptr = NULL;
 	connector->status = connector_status_unknown;
 	connector->display_info.panel_orientation =
 		DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
@@ -272,6 +273,9 @@ int drm_connector_init(struct drm_device *dev,
 	drm_object_attach_property(&connector->base,
 				   config->non_desktop_property,
 				   0);
+	drm_object_attach_property(&connector->base,
+				   config->tile_property,
+				   0);
 
 	if (drm_core_check_feature(dev, DRIVER_ATOMIC)) {
 		drm_object_attach_property(&connector->base, config->prop_crtc_id, 0);
@@ -1712,6 +1716,8 @@ EXPORT_SYMBOL(drm_connector_set_path_property);
  * This looks up the tile information for a connector, and creates a
  * property for userspace to parse if it exists. The property is of
  * the form of 8 integers using ':' as a separator.
+ * This is used for dual port tiled displays with DisplayPort SST
+ * or DisplayPort MST connectors.
  *
  * Returns:
  * Zero on success, errno on failure.
@@ -1755,6 +1761,9 @@ EXPORT_SYMBOL(drm_connector_set_tile_property);
  *
  * This function creates a new blob modeset object and assigns its id to the
  * connector's edid property.
+ * Since we also parse tile information from EDID's displayID block, we also
+ * set the connector's tile property here. See drm_connector_set_tile_property()
+ * for more details.
  *
  * Returns:
  * Zero on success, negative errno on failure.
@@ -1796,7 +1805,9 @@ int drm_connector_update_edid_property(struct drm_connector *connector,
 	                                       edid,
 	                                       &connector->base,
 	                                       dev->mode_config.edid_property);
-	return ret;
+	if (ret)
+		return ret;
+	return drm_connector_set_tile_property(connector);
 }
 EXPORT_SYMBOL(drm_connector_update_edid_property);
 
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index dc7ac0c60547..c630ed157994 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3022,7 +3022,6 @@ struct edid *drm_dp_mst_get_edid(struct drm_connector *connector, struct drm_dp_
 		edid = drm_edid_duplicate(port->cached_edid);
 	else {
 		edid = drm_get_edid(connector, &port->aux.ddc);
-		drm_connector_set_tile_property(connector);
 	}
 	port->has_audio = drm_detect_monitor_audio(edid);
 	drm_dp_mst_topology_put_port(port);
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/dp: Set the connector's TILE property even for DP SST connectors
  2019-03-13  2:17 [PATCH] drm/dp: Set the connector's TILE property even for DP SST connectors Manasi Navare
@ 2019-03-13 18:48 ` Alex Deucher
  2019-03-14 18:43   ` Manasi Navare
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2019-03-13 18:48 UTC (permalink / raw)
  To: Manasi Navare
  Cc: Dave Airlie, Intel Graphics Development,
	Maling list - DRI developers, Daniel Vetter

On Tue, Mar 12, 2019 at 10:15 PM Manasi Navare
<manasi.d.navare@intel.com> wrote:
>
> Current driver sets the tile property only for DP MST connectors.
> However there are some tiled displays where each SST connector
> carries a single tile. So we need to attach this property object
> for every connector and set it for every connector (DP SST and MST).
> Plus since the tile information is obtained as a result of EDID
> parsing, the best place to update tile property is where we update
> edid property.
> Also now we dont need to explicitly set this now for MST connectors.
>
> This has been tested with xrandr --props and modetest and verified
> that TILE property is exposed correctly.
>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/drm_connector.c       | 13 ++++++++++++-
>  drivers/gpu/drm/drm_dp_mst_topology.c |  1 -
>  2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 07d65a16c623..2355124849db 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -245,6 +245,7 @@ int drm_connector_init(struct drm_device *dev,
>         INIT_LIST_HEAD(&connector->modes);
>         mutex_init(&connector->mutex);
>         connector->edid_blob_ptr = NULL;
> +       connector->tile_blob_ptr = NULL;
>         connector->status = connector_status_unknown;
>         connector->display_info.panel_orientation =
>                 DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
> @@ -272,6 +273,9 @@ int drm_connector_init(struct drm_device *dev,
>         drm_object_attach_property(&connector->base,
>                                    config->non_desktop_property,
>                                    0);
> +       drm_object_attach_property(&connector->base,
> +                                  config->tile_property,
> +                                  0);
>
>         if (drm_core_check_feature(dev, DRIVER_ATOMIC)) {
>                 drm_object_attach_property(&connector->base, config->prop_crtc_id, 0);
> @@ -1712,6 +1716,8 @@ EXPORT_SYMBOL(drm_connector_set_path_property);
>   * This looks up the tile information for a connector, and creates a
>   * property for userspace to parse if it exists. The property is of
>   * the form of 8 integers using ':' as a separator.
> + * This is used for dual port tiled displays with DisplayPort SST
> + * or DisplayPort MST connectors.
>   *
>   * Returns:
>   * Zero on success, errno on failure.
> @@ -1755,6 +1761,9 @@ EXPORT_SYMBOL(drm_connector_set_tile_property);
>   *
>   * This function creates a new blob modeset object and assigns its id to the
>   * connector's edid property.
> + * Since we also parse tile information from EDID's displayID block, we also
> + * set the connector's tile property here. See drm_connector_set_tile_property()
> + * for more details.
>   *
>   * Returns:
>   * Zero on success, negative errno on failure.
> @@ -1796,7 +1805,9 @@ int drm_connector_update_edid_property(struct drm_connector *connector,
>                                                edid,
>                                                &connector->base,
>                                                dev->mode_config.edid_property);
> -       return ret;
> +       if (ret)
> +               return ret;
> +       return drm_connector_set_tile_property(connector);
>  }
>  EXPORT_SYMBOL(drm_connector_update_edid_property);
>
> diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> index dc7ac0c60547..c630ed157994 100644
> --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> @@ -3022,7 +3022,6 @@ struct edid *drm_dp_mst_get_edid(struct drm_connector *connector, struct drm_dp_
>                 edid = drm_edid_duplicate(port->cached_edid);
>         else {
>                 edid = drm_get_edid(connector, &port->aux.ddc);
> -               drm_connector_set_tile_property(connector);
>         }
>         port->has_audio = drm_detect_monitor_audio(edid);
>         drm_dp_mst_topology_put_port(port);
> --
> 2.19.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/dp: Set the connector's TILE property even for DP SST connectors
  2019-03-13 18:48 ` Alex Deucher
@ 2019-03-14 18:43   ` Manasi Navare
  0 siblings, 0 replies; 3+ messages in thread
From: Manasi Navare @ 2019-03-14 18:43 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Dave Airlie, Intel Graphics Development,
	Maling list - DRI developers, Daniel Vetter

Pushed to drm-misc, thanks for the patch and the review!

Regards
Manasi

On Wed, Mar 13, 2019 at 02:48:36PM -0400, Alex Deucher wrote:
> On Tue, Mar 12, 2019 at 10:15 PM Manasi Navare
> <manasi.d.navare@intel.com> wrote:
> >
> > Current driver sets the tile property only for DP MST connectors.
> > However there are some tiled displays where each SST connector
> > carries a single tile. So we need to attach this property object
> > for every connector and set it for every connector (DP SST and MST).
> > Plus since the tile information is obtained as a result of EDID
> > parsing, the best place to update tile property is where we update
> > edid property.
> > Also now we dont need to explicitly set this now for MST connectors.
> >
> > This has been tested with xrandr --props and modetest and verified
> > that TILE property is exposed correctly.
> >
> > Cc: Dave Airlie <airlied@redhat.com>
> > Cc: Jani Nikula <jani.nikula@linux.intel.com>
> > Cc: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> 
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> 
> > ---
> >  drivers/gpu/drm/drm_connector.c       | 13 ++++++++++++-
> >  drivers/gpu/drm/drm_dp_mst_topology.c |  1 -
> >  2 files changed, 12 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> > index 07d65a16c623..2355124849db 100644
> > --- a/drivers/gpu/drm/drm_connector.c
> > +++ b/drivers/gpu/drm/drm_connector.c
> > @@ -245,6 +245,7 @@ int drm_connector_init(struct drm_device *dev,
> >         INIT_LIST_HEAD(&connector->modes);
> >         mutex_init(&connector->mutex);
> >         connector->edid_blob_ptr = NULL;
> > +       connector->tile_blob_ptr = NULL;
> >         connector->status = connector_status_unknown;
> >         connector->display_info.panel_orientation =
> >                 DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
> > @@ -272,6 +273,9 @@ int drm_connector_init(struct drm_device *dev,
> >         drm_object_attach_property(&connector->base,
> >                                    config->non_desktop_property,
> >                                    0);
> > +       drm_object_attach_property(&connector->base,
> > +                                  config->tile_property,
> > +                                  0);
> >
> >         if (drm_core_check_feature(dev, DRIVER_ATOMIC)) {
> >                 drm_object_attach_property(&connector->base, config->prop_crtc_id, 0);
> > @@ -1712,6 +1716,8 @@ EXPORT_SYMBOL(drm_connector_set_path_property);
> >   * This looks up the tile information for a connector, and creates a
> >   * property for userspace to parse if it exists. The property is of
> >   * the form of 8 integers using ':' as a separator.
> > + * This is used for dual port tiled displays with DisplayPort SST
> > + * or DisplayPort MST connectors.
> >   *
> >   * Returns:
> >   * Zero on success, errno on failure.
> > @@ -1755,6 +1761,9 @@ EXPORT_SYMBOL(drm_connector_set_tile_property);
> >   *
> >   * This function creates a new blob modeset object and assigns its id to the
> >   * connector's edid property.
> > + * Since we also parse tile information from EDID's displayID block, we also
> > + * set the connector's tile property here. See drm_connector_set_tile_property()
> > + * for more details.
> >   *
> >   * Returns:
> >   * Zero on success, negative errno on failure.
> > @@ -1796,7 +1805,9 @@ int drm_connector_update_edid_property(struct drm_connector *connector,
> >                                                edid,
> >                                                &connector->base,
> >                                                dev->mode_config.edid_property);
> > -       return ret;
> > +       if (ret)
> > +               return ret;
> > +       return drm_connector_set_tile_property(connector);
> >  }
> >  EXPORT_SYMBOL(drm_connector_update_edid_property);
> >
> > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
> > index dc7ac0c60547..c630ed157994 100644
> > --- a/drivers/gpu/drm/drm_dp_mst_topology.c
> > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c
> > @@ -3022,7 +3022,6 @@ struct edid *drm_dp_mst_get_edid(struct drm_connector *connector, struct drm_dp_
> >                 edid = drm_edid_duplicate(port->cached_edid);
> >         else {
> >                 edid = drm_get_edid(connector, &port->aux.ddc);
> > -               drm_connector_set_tile_property(connector);
> >         }
> >         port->has_audio = drm_detect_monitor_audio(edid);
> >         drm_dp_mst_topology_put_port(port);
> > --
> > 2.19.1
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-03-14 18:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13  2:17 [PATCH] drm/dp: Set the connector's TILE property even for DP SST connectors Manasi Navare
2019-03-13 18:48 ` Alex Deucher
2019-03-14 18:43   ` Manasi Navare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).