Displaying 20 results from an estimated 21 matches for "drm_underscan_on".
2018 May 07
8
[PATCH 0/3] drm/connector: Provide generic support for underscan
Hello,
This is an attempt at providing generic support for underscan connector
props. We already have 3 drivers defining the same underscan, underscan
vborder and underscan hborder properties (amd, radeon and nouveau) and
I am about to add a new one, hence my proposal to put the prop parsing
code in the core and add ->underscan fields to drm_connector_state.
Note that I use this new
2018 May 11
5
[PATCH v2 0/4] drm/connector: Provide generic support for underscan
Hello,
This is an attempt at providing generic support for underscan connector
props. We already have 3 drivers defining the same underscan, underscan
vborder and underscan hborder properties (amd, radeon and nouveau) and
I am about to add a new one, hence my proposal to put the prop parsing
code in the core and add ->underscan fields to drm_connector_state.
In this v2, I also converted the
2018 Nov 22
5
[PATCH v3 0/3] drm/connector: Provide generic support for underscan
Hello,
This is an attempt at providing generic support for underscan connector
props. We already have 3 drivers defining the same underscan, underscan
vborder and underscan hborder properties (amd, radeon and nouveau) and
I am about to add a new one, hence my proposal to put the prop parsing
code in the core and add ->underscan fields to drm_connector_state.
This v3 was based on the "VC4
2018 May 07
2
[PATCH 1/3] drm/connector: Add generic underscan properties
...ice *dev)
> @@ -1108,6 +1133,101 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
> }
> EXPORT_SYMBOL(drm_mode_create_tv_properties);
>
> +static const struct drm_prop_enum_list drm_underscan_mode_enum_list[] = {
> + { DRM_UNDERSCAN_OFF, "off" },
> + { DRM_UNDERSCAN_ON, "on" },
> + { DRM_UNDERSCAN_AUTO, "auto" },
> +};
> +
> +/**
> + * drm_connector_attach_underscan_properties - attach atomic underscan
> + * properties
> + * @connector: connector to attach underscan mode properties on.
> + * @mode_mask: bitma...
2018 May 07
0
[PATCH 3/3] drm/vc4: Attach underscan props to the HDMI connector
...to 1024 which
+ * should be more than enough for real use cases. Note that the actual
+ * limitation comes from the display mode:
+ * hborder < hdisplay && vborder < vdisplay
+ */
+ drm_connector_attach_underscan_properties(connector,
+ BIT(DRM_UNDERSCAN_OFF) |
+ BIT(DRM_UNDERSCAN_ON),
+ 1024, 1024);
+
connector->polled = (DRM_CONNECTOR_POLL_CONNECT |
DRM_CONNECTOR_POLL_DISCONNECT);
@@ -408,6 +418,9 @@ static void vc4_hdmi_write_infoframe(struct drm_encoder *encoder,
static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
{
struct vc4_hdmi...
2018 Nov 22
0
[PATCH v3 3/3] drm/vc4: Attach underscan props to the HDMI connector
...to 1024 which
+ * should be more than enough for real use cases. Note that the actual
+ * limitation comes from the display mode:
+ * hborder < hdisplay && vborder < vdisplay
+ */
+ drm_connector_attach_underscan_properties(connector,
+ BIT(DRM_UNDERSCAN_OFF) |
+ BIT(DRM_UNDERSCAN_ON),
+ 1024, 1024);
+
connector->polled = (DRM_CONNECTOR_POLL_CONNECT |
DRM_CONNECTOR_POLL_DISCONNECT);
@@ -408,6 +418,9 @@ static void vc4_hdmi_write_infoframe(struct drm_encoder *encoder,
static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
{
struct vc4_hdmi...
2018 May 07
0
[PATCH 1/3] drm/connector: Add generic underscan properties
..._standard_properties(struct drm_device *dev)
@@ -1108,6 +1133,101 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
}
EXPORT_SYMBOL(drm_mode_create_tv_properties);
+static const struct drm_prop_enum_list drm_underscan_mode_enum_list[] = {
+ { DRM_UNDERSCAN_OFF, "off" },
+ { DRM_UNDERSCAN_ON, "on" },
+ { DRM_UNDERSCAN_AUTO, "auto" },
+};
+
+/**
+ * drm_connector_attach_underscan_properties - attach atomic underscan
+ * properties
+ * @connector: connector to attach underscan mode properties on.
+ * @mode_mask: bitmask of %DRM_UNDERSCAN_XX modes encoding t...
2018 Nov 22
0
[PATCH v3 1/3] drm/connector: Add generic underscan properties
..._standard_properties(struct drm_device *dev)
@@ -1241,6 +1273,101 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
}
EXPORT_SYMBOL(drm_mode_create_tv_properties);
+static const struct drm_prop_enum_list drm_underscan_mode_enum_list[] = {
+ { DRM_UNDERSCAN_OFF, "off" },
+ { DRM_UNDERSCAN_ON, "on" },
+ { DRM_UNDERSCAN_AUTO, "auto" },
+};
+
+/**
+ * drm_connector_attach_underscan_properties - attach atomic underscan
+ * properties
+ * @connector: connector to attach underscan mode properties on.
+ * @mode_mask: bitmask of %DRM_UNDERSCAN_XX modes encoding t...
2018 May 07
0
[PATCH 1/3] drm/connector: Add generic underscan properties
...3,101 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
> > }
> > EXPORT_SYMBOL(drm_mode_create_tv_properties);
> >
> > +static const struct drm_prop_enum_list drm_underscan_mode_enum_list[] = {
> > + { DRM_UNDERSCAN_OFF, "off" },
> > + { DRM_UNDERSCAN_ON, "on" },
> > + { DRM_UNDERSCAN_AUTO, "auto" },
> > +};
> > +
> > +/**
> > + * drm_connector_attach_underscan_properties - attach atomic underscan
> > + * properties
> > + * @connector: connector to attach underscan mode proper...
2018 Nov 22
1
[PATCH v3 1/3] drm/connector: Add generic underscan properties
...drm_device *dev)
>@@ -1241,6 +1273,101 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
> }
> EXPORT_SYMBOL(drm_mode_create_tv_properties);
>
>+static const struct drm_prop_enum_list drm_underscan_mode_enum_list[] = {
>+ { DRM_UNDERSCAN_OFF, "off" },
>+ { DRM_UNDERSCAN_ON, "on" },
>+ { DRM_UNDERSCAN_AUTO, "auto" },
>+};
>+
>+/**
>+ * drm_connector_attach_underscan_properties - attach atomic underscan
>+ * properties
>+ * @connector: connector to attach underscan mode properties on.
>+ * @mode_mask: bitmask of %D...
2018 Nov 22
0
[PATCH v3 2/3] drm/vc4: Take underscan setup into account when updating planes
...ht be called before
+ * vc4_crtc_atomic_check() which means underscan info in vc4_crtc_state
+ * might be outdated.
+ */
+ for_each_new_connector_in_state(state->state, conn, conn_state, i) {
+ if (conn_state->crtc != state->crtc)
+ continue;
+
+ if (conn_state->underscan.mode == DRM_UNDERSCAN_ON) {
+ *vborder = conn_state->underscan.vborder;
+ *hborder = conn_state->underscan.hborder;
+ } else {
+ *vborder = 0;
+ *hborder = 0;
+ }
+
+ break;
+ }
+}
+
static int vc4_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{
@@ -657,6 +695,7 @@ static i...
2018 May 11
2
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...int i;
> +
> + for_each_new_connector_in_state(pstate->state, conn, conn_state, i) {
> + if (conn_state->crtc == pstate->crtc)
> + break;
> + }
> +
> + if (i == pstate->state->num_connector)
> + return 0;
> +
> + if (conn_state->underscan.mode != DRM_UNDERSCAN_ON)
> + return 0;
> +
> + crtc_state = drm_atomic_get_new_crtc_state(pstate->state,
> + pstate->crtc);
> +
> + if (conn_state->underscan.hborder >= crtc_state->mode.hdisplay ||
> + conn_state->underscan.vborder >= crtc_state->mode.vdisplay)
>...
2018 May 07
2
[PATCH 3/3] drm/vc4: Attach underscan props to the HDMI connector
...itation comes from the display mode:
> + * hborder < hdisplay && vborder < vdisplay
> + */
> + drm_connector_attach_underscan_properties(connector,
We should probably sprinkle __must_check over all these :-)
-Daniel
> + BIT(DRM_UNDERSCAN_OFF) |
> + BIT(DRM_UNDERSCAN_ON),
> + 1024, 1024);
> +
> connector->polled = (DRM_CONNECTOR_POLL_CONNECT |
> DRM_CONNECTOR_POLL_DISCONNECT);
>
> @@ -408,6 +418,9 @@ static void vc4_hdmi_write_infoframe(struct drm_encoder *encoder,
> static void vc4_hdmi_set_avi_infoframe(struct drm_enc...
2018 May 11
2
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...nn_state, i) {
> > > + if (conn_state->crtc == pstate->crtc)
> > > + break;
> > > + }
> > > +
> > > + if (i == pstate->state->num_connector)
> > > + return 0;
> > > +
> > > + if (conn_state->underscan.mode != DRM_UNDERSCAN_ON)
> > > + return 0;
> > > +
> > > + crtc_state = drm_atomic_get_new_crtc_state(pstate->state,
> > > + pstate->crtc);
> > > +
> > > + if (conn_state->underscan.hborder >= crtc_state->mode.hdisplay ||
> > > + co...
2018 May 11
3
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...;crtc)
> > > > > + break;
> > > > > + }
> > > > > +
> > > > > + if (i == pstate->state->num_connector)
> > > > > + return 0;
> > > > > +
> > > > > + if (conn_state->underscan.mode != DRM_UNDERSCAN_ON)
> > > > > + return 0;
> > > > > +
> > > > > + crtc_state = drm_atomic_get_new_crtc_state(pstate->state,
> > > > > + pstate->crtc);
> > > > > +
> > > > > + if (conn_state->underscan.hborder &...
2018 May 07
2
[PATCH 1/3] drm/connector: Add generic underscan properties
...ice *dev)
> @@ -1108,6 +1133,101 @@ int drm_mode_create_tv_properties(struct drm_device *dev,
> }
> EXPORT_SYMBOL(drm_mode_create_tv_properties);
>
> +static const struct drm_prop_enum_list drm_underscan_mode_enum_list[] = {
> + { DRM_UNDERSCAN_OFF, "off" },
> + { DRM_UNDERSCAN_ON, "on" },
> + { DRM_UNDERSCAN_AUTO, "auto" },
> +};
> +
> +/**
> + * drm_connector_attach_underscan_properties - attach atomic underscan
> + * properties
> + * @connector: connector to attach underscan mode properties on.
> + * @mode_mask: bitma...
2018 May 11
0
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...ctor *conn;
+ struct drm_crtc_state *crtc_state;
+ int i;
+
+ for_each_new_connector_in_state(pstate->state, conn, conn_state, i) {
+ if (conn_state->crtc == pstate->crtc)
+ break;
+ }
+
+ if (i == pstate->state->num_connector)
+ return 0;
+
+ if (conn_state->underscan.mode != DRM_UNDERSCAN_ON)
+ return 0;
+
+ crtc_state = drm_atomic_get_new_crtc_state(pstate->state,
+ pstate->crtc);
+
+ if (conn_state->underscan.hborder >= crtc_state->mode.hdisplay ||
+ conn_state->underscan.vborder >= crtc_state->mode.vdisplay)
+ return -EINVAL;
+
+ vc4_pstate->...
2018 May 11
0
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...ctor_in_state(pstate->state, conn, conn_state, i) {
> > + if (conn_state->crtc == pstate->crtc)
> > + break;
> > + }
> > +
> > + if (i == pstate->state->num_connector)
> > + return 0;
> > +
> > + if (conn_state->underscan.mode != DRM_UNDERSCAN_ON)
> > + return 0;
> > +
> > + crtc_state = drm_atomic_get_new_crtc_state(pstate->state,
> > + pstate->crtc);
> > +
> > + if (conn_state->underscan.hborder >= crtc_state->mode.hdisplay ||
> > + conn_state->underscan.vborder >...
2018 May 11
1
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...t; > > > + }
> > > > > > > +
> > > > > > > + if (i == pstate->state->num_connector)
> > > > > > > + return 0;
> > > > > > > +
> > > > > > > + if (conn_state->underscan.mode != DRM_UNDERSCAN_ON)
> > > > > > > + return 0;
> > > > > > > +
> > > > > > > + crtc_state = drm_atomic_get_new_crtc_state(pstate->state,
> > > > > > > + pstate->crtc);
> > > > > > > +
> > >...
2018 May 11
0
[PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes
...(conn_state->crtc == pstate->crtc)
> > > > + break;
> > > > + }
> > > > +
> > > > + if (i == pstate->state->num_connector)
> > > > + return 0;
> > > > +
> > > > + if (conn_state->underscan.mode != DRM_UNDERSCAN_ON)
> > > > + return 0;
> > > > +
> > > > + crtc_state = drm_atomic_get_new_crtc_state(pstate->state,
> > > > + pstate->crtc);
> > > > +
> > > > + if (conn_state->underscan.hborder >= crtc_state->mode.hdisp...