* [PATCH 1/2] drm/edid: Add drm_hdmi_avi_infoframe_bars()
@ 2019-10-08 16:48 Ville Syrjala
2019-10-08 16:48 ` [PATCH 2/2] drm/vc4: Use drm_hdmi_avi_infoframe_bars() Ville Syrjala
0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjala @ 2019-10-08 16:48 UTC (permalink / raw)
To: dri-devel; +Cc: Boris Brezillon
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Add a function to fill the AVI infoframe bar information from
the standard tv margin properties.
Cc: Eric Anholt <eric@anholt.net>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/drm_edid.c | 17 +++++++++++++++++
include/drm/drm_edid.h | 4 ++++
2 files changed, 21 insertions(+)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 0552175313cb..4af184b07cc1 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -5382,6 +5382,23 @@ drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame,
}
EXPORT_SYMBOL(drm_hdmi_avi_infoframe_quant_range);
+/**
+ * drm_hdmi_avi_infoframe_bars() - fill the HDMI AVI infoframe
+ * bar information
+ * @frame: HDMI AVI infoframe
+ * @conn_state: connector state
+ */
+void
+drm_hdmi_avi_infoframe_bars(struct hdmi_avi_infoframe *frame,
+ const struct drm_connector_state *conn_state)
+{
+ frame->right_bar = conn_state->tv.margins.right;
+ frame->left_bar = conn_state->tv.margins.left;
+ frame->top_bar = conn_state->tv.margins.top;
+ frame->bottom_bar = conn_state->tv.margins.bottom;
+}
+EXPORT_SYMBOL(drm_hdmi_avi_infoframe_bars);
+
static enum hdmi_3d_structure
s3d_structure_from_display_mode(const struct drm_display_mode *mode)
{
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index b9719418c3d2..e0701b3d3194 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -367,6 +367,10 @@ void
drm_hdmi_avi_infoframe_colorspace(struct hdmi_avi_infoframe *frame,
const struct drm_connector_state *conn_state);
+void
+drm_hdmi_avi_infoframe_bars(struct hdmi_avi_infoframe *frame,
+ const struct drm_connector_state *conn_state);
+
void
drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame,
struct drm_connector *connector,
--
2.21.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] drm/vc4: Use drm_hdmi_avi_infoframe_bars()
2019-10-08 16:48 [PATCH 1/2] drm/edid: Add drm_hdmi_avi_infoframe_bars() Ville Syrjala
@ 2019-10-08 16:48 ` Ville Syrjala
2019-10-22 16:23 ` Ville Syrjälä
0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjala @ 2019-10-08 16:48 UTC (permalink / raw)
To: dri-devel; +Cc: Boris Brezillon
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Use the new drm_hdmi_avi_infoframe_bars() helper instead
of hand rolling it.
Cc: Eric Anholt <eric@anholt.net>
Cc: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/vc4/vc4_hdmi.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 0853b980bcb3..1c62c6c9244b 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -398,10 +398,7 @@ static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
HDMI_QUANTIZATION_RANGE_LIMITED :
HDMI_QUANTIZATION_RANGE_FULL);
- frame.avi.right_bar = cstate->tv.margins.right;
- frame.avi.left_bar = cstate->tv.margins.left;
- frame.avi.top_bar = cstate->tv.margins.top;
- frame.avi.bottom_bar = cstate->tv.margins.bottom;
+ drm_hdmi_avi_infoframe_bars(&frame.avi, cstate);
vc4_hdmi_write_infoframe(encoder, &frame);
}
--
2.21.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm/vc4: Use drm_hdmi_avi_infoframe_bars()
2019-10-08 16:48 ` [PATCH 2/2] drm/vc4: Use drm_hdmi_avi_infoframe_bars() Ville Syrjala
@ 2019-10-22 16:23 ` Ville Syrjälä
0 siblings, 0 replies; 3+ messages in thread
From: Ville Syrjälä @ 2019-10-22 16:23 UTC (permalink / raw)
To: dri-devel; +Cc: Boris Brezillon
On Tue, Oct 08, 2019 at 07:48:14PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Use the new drm_hdmi_avi_infoframe_bars() helper instead
> of hand rolling it.
>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Boris Brezillon <boris.brezillon@bootlin.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Series pushed to drm-misc-next with Boris's irc rb:
19:03 < vsyrjala> anholt: bbrezillon: thoughts on https://patchwork.freedesktop.org/series/67742/ ?
19:05 < bbrezillon> vsyrjala: R-b
Thanks.
> ---
> drivers/gpu/drm/vc4/vc4_hdmi.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index 0853b980bcb3..1c62c6c9244b 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -398,10 +398,7 @@ static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
> HDMI_QUANTIZATION_RANGE_LIMITED :
> HDMI_QUANTIZATION_RANGE_FULL);
>
> - frame.avi.right_bar = cstate->tv.margins.right;
> - frame.avi.left_bar = cstate->tv.margins.left;
> - frame.avi.top_bar = cstate->tv.margins.top;
> - frame.avi.bottom_bar = cstate->tv.margins.bottom;
> + drm_hdmi_avi_infoframe_bars(&frame.avi, cstate);
>
> vc4_hdmi_write_infoframe(encoder, &frame);
> }
> --
> 2.21.0
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-22 16:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-08 16:48 [PATCH 1/2] drm/edid: Add drm_hdmi_avi_infoframe_bars() Ville Syrjala
2019-10-08 16:48 ` [PATCH 2/2] drm/vc4: Use drm_hdmi_avi_infoframe_bars() Ville Syrjala
2019-10-22 16:23 ` Ville Syrjälä
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).