On Mon, 27 Feb 2023 12:21:16 +0000 Simon Ser <contact@xxxxxxxxxxx> wrote: > Add docs for "{left,right,top,bottom} margin" properties. > > Signed-off-by: Simon Ser <contact@xxxxxxxxxxx> > Cc: Maxime Ripard <maxime@xxxxxxxxxx> > Cc: Daniel Vetter <daniel@xxxxxxxx> > Cc: Pekka Paalanen <ppaalanen@xxxxxxxxx> > Cc: Noralf Trønnes <noralf@xxxxxxxxxxx> > Cc: Mateusz Kwiatkowski <kfyatek+publicgit@xxxxxxxxx> > --- > drivers/gpu/drm/drm_connector.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c > index 9d0250c28e9b..65a586680940 100644 > --- a/drivers/gpu/drm/drm_connector.c > +++ b/drivers/gpu/drm/drm_connector.c > @@ -1590,10 +1590,6 @@ EXPORT_SYMBOL(drm_connector_attach_dp_subconnector_property); > > /* > * TODO: Document the properties: > - * - left margin > - * - right margin > - * - top margin > - * - bottom margin > * - brightness > * - contrast > * - flicker reduction > @@ -1651,6 +1647,16 @@ EXPORT_SYMBOL(drm_connector_attach_dp_subconnector_property); > * > * Drivers can set up this property by calling > * drm_mode_create_tv_properties(). > + * > + * left margin, right margin, top margin, bottom margin: > + * Add margins to the connector's viewport. > + * > + * The value is the size in pixels of the black border which will be > + * added. The attached CRTC's content will be scaled to fill the whole > + * area inside the margin. > + * > + * Drivers can set up these properties by calling > + * drm_mode_create_tv_margin_properties(). > */ > > /** Hi Simon, can these be negative as well, to achieve overscan and not just underscan? Did I get overscan and underscan right... these are related to under/overscan, aren't they? Hmm, no, I guess that doesn't make sense, there is no room in the signal to have negative margins, it would result in clipping the framebuffer while scaling up. So this can only be used to scale framebuffer *down*, add borders, and the TV then scales it back up again? Looks like neither my Intel nor AMD cards support these, I don't see the properties. More things to the list of KMS properties Weston needs to explicitly control. Oh, it seems vc4 exclusive for now. Where does this text appear in the HTML kernel docs? I tried to look at drm_connector.c but I cannot find the spot where this patch applies. Is this actually a connector property? How does that work, should this not be a CRTC property? Is this instead not scaling anything but simply sending metadata through the connector? Or are there underlying requirements that this connector property is actually affecting the CRTC, which means that it is fundamentally impossible to use multiple connectors with different values on the same CRTC? And drivers will reject any attempt, so there is no need to define what conflicting settings will do? IOW, does simply the existence of these properties on a connector guarantee that the connector must be the only one on a CRTC? Thanks, pq
Attachment:
pgpVE8loD6EO9.pgp
Description: OpenPGP digital signature