* [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes
@ 2024-08-27 16:39 Derek Foreman
2024-08-27 16:42 ` Maxime Ripard
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Derek Foreman @ 2024-08-27 16:39 UTC (permalink / raw)
To: dri-devel
Cc: Maxime Ripard, kernel, Jani Nikula, Helge Deller, linux-fbdev,
Derek Foreman
The largest infoframe we create is the DRM (Dynamic Range Mastering)
infoframe which is 26 bytes + a 4 byte header, for a total of 30
bytes.
With HDMI_MAX_INFOFRAME_SIZE set to 29 bytes, as it is now, we
allocate too little space to pack a DRM infoframe in
write_device_infoframe(), leading to an ENOSPC return from
hdmi_infoframe_pack(), and never calling the connector's
write_infoframe() vfunc.
Instead of having HDMI_MAX_INFOFRAME_SIZE defined in two places,
replace HDMI_MAX_INFOFRAME_SIZE with HDMI_INFOFRAME_SIZE(MAX) and make
MAX 27 bytes - which is defined by the HDMI specification to be the
largest infoframe payload.
Fixes: f378b77227bc ("drm/connector: hdmi: Add Infoframes generation")
Fixes: c602e4959a0c ("drm/connector: hdmi: Create Infoframe DebugFS entries")
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
---
drivers/gpu/drm/display/drm_hdmi_state_helper.c | 4 +---
drivers/gpu/drm/drm_debugfs.c | 4 +---
include/linux/hdmi.h | 9 +++++++++
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
index 7854820089ec..feb7a3a75981 100644
--- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
@@ -521,8 +521,6 @@ int drm_atomic_helper_connector_hdmi_check(struct drm_connector *connector,
}
EXPORT_SYMBOL(drm_atomic_helper_connector_hdmi_check);
-#define HDMI_MAX_INFOFRAME_SIZE 29
-
static int clear_device_infoframe(struct drm_connector *connector,
enum hdmi_infoframe_type type)
{
@@ -563,7 +561,7 @@ static int write_device_infoframe(struct drm_connector *connector,
{
const struct drm_connector_hdmi_funcs *funcs = connector->hdmi.funcs;
struct drm_device *dev = connector->dev;
- u8 buffer[HDMI_MAX_INFOFRAME_SIZE];
+ u8 buffer[HDMI_INFOFRAME_SIZE(MAX)];
int ret;
int len;
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 6b239a24f1df..9d3e6dd68810 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -520,8 +520,6 @@ static const struct file_operations drm_connector_fops = {
.write = connector_write
};
-#define HDMI_MAX_INFOFRAME_SIZE 29
-
static ssize_t
audio_infoframe_read(struct file *filp, char __user *ubuf, size_t count, loff_t *ppos)
{
@@ -579,7 +577,7 @@ static ssize_t _f##_read_infoframe(struct file *filp, \
struct drm_connector *connector; \
union hdmi_infoframe *frame; \
struct drm_device *dev; \
- u8 buf[HDMI_MAX_INFOFRAME_SIZE]; \
+ u8 buf[HDMI_INFOFRAME_SIZE(MAX)]; \
ssize_t len = 0; \
\
connector = filp->private_data; \
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index 3bb87bf6bc65..455f855bc084 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -59,6 +59,15 @@ enum hdmi_infoframe_type {
#define HDMI_DRM_INFOFRAME_SIZE 26
#define HDMI_VENDOR_INFOFRAME_SIZE 4
+/*
+ * HDMI 1.3a table 5-14 states that the largest InfoFrame_length is 27,
+ * not including the packet header or checksum byte. We include the
+ * checksum byte in HDMI_INFOFRAME_HEADER_SIZE, so this should allow
+ * HDMI_INFOFRAME_SIZE(MAX) to be the largest buffer we could ever need
+ * for any HDMI infoframe.
+ */
+#define HDMI_MAX_INFOFRAME_SIZE 27
+
#define HDMI_INFOFRAME_SIZE(type) \
(HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes
2024-08-27 16:39 [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes Derek Foreman
@ 2024-08-27 16:42 ` Maxime Ripard
2024-08-28 8:31 ` Jani Nikula
2024-09-24 14:13 ` Maxime Ripard
2 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2024-08-27 16:42 UTC (permalink / raw)
To: Derek Foreman
Cc: dri-devel, kernel, linux-fbdev, Helge Deller, Jani Nikula,
Maxime Ripard
On Tue, 27 Aug 2024 11:39:04 -0500, Derek Foreman wrote:
> The largest infoframe we create is the DRM (Dynamic Range Mastering)
> infoframe which is 26 bytes + a 4 byte header, for a total of 30
> bytes.
>
> With HDMI_MAX_INFOFRAME_SIZE set to 29 bytes, as it is now, we
>
> [ ... ]
Acked-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes
2024-08-27 16:39 [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes Derek Foreman
2024-08-27 16:42 ` Maxime Ripard
@ 2024-08-28 8:31 ` Jani Nikula
2024-09-16 11:44 ` Derek Foreman
2024-09-24 14:13 ` Maxime Ripard
2 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2024-08-28 8:31 UTC (permalink / raw)
To: Derek Foreman, dri-devel
Cc: Maxime Ripard, kernel, Helge Deller, linux-fbdev, Derek Foreman
On Tue, 27 Aug 2024, Derek Foreman <derek.foreman@collabora.com> wrote:
> The largest infoframe we create is the DRM (Dynamic Range Mastering)
> infoframe which is 26 bytes + a 4 byte header, for a total of 30
> bytes.
>
> With HDMI_MAX_INFOFRAME_SIZE set to 29 bytes, as it is now, we
> allocate too little space to pack a DRM infoframe in
> write_device_infoframe(), leading to an ENOSPC return from
> hdmi_infoframe_pack(), and never calling the connector's
> write_infoframe() vfunc.
>
> Instead of having HDMI_MAX_INFOFRAME_SIZE defined in two places,
> replace HDMI_MAX_INFOFRAME_SIZE with HDMI_INFOFRAME_SIZE(MAX) and make
> MAX 27 bytes - which is defined by the HDMI specification to be the
> largest infoframe payload.
>
> Fixes: f378b77227bc ("drm/connector: hdmi: Add Infoframes generation")
> Fixes: c602e4959a0c ("drm/connector: hdmi: Create Infoframe DebugFS entries")
>
Superfluous blank line. Can be fixed while applying.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
> ---
> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 4 +---
> drivers/gpu/drm/drm_debugfs.c | 4 +---
> include/linux/hdmi.h | 9 +++++++++
> 3 files changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> index 7854820089ec..feb7a3a75981 100644
> --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
> @@ -521,8 +521,6 @@ int drm_atomic_helper_connector_hdmi_check(struct drm_connector *connector,
> }
> EXPORT_SYMBOL(drm_atomic_helper_connector_hdmi_check);
>
> -#define HDMI_MAX_INFOFRAME_SIZE 29
> -
> static int clear_device_infoframe(struct drm_connector *connector,
> enum hdmi_infoframe_type type)
> {
> @@ -563,7 +561,7 @@ static int write_device_infoframe(struct drm_connector *connector,
> {
> const struct drm_connector_hdmi_funcs *funcs = connector->hdmi.funcs;
> struct drm_device *dev = connector->dev;
> - u8 buffer[HDMI_MAX_INFOFRAME_SIZE];
> + u8 buffer[HDMI_INFOFRAME_SIZE(MAX)];
> int ret;
> int len;
>
> diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
> index 6b239a24f1df..9d3e6dd68810 100644
> --- a/drivers/gpu/drm/drm_debugfs.c
> +++ b/drivers/gpu/drm/drm_debugfs.c
> @@ -520,8 +520,6 @@ static const struct file_operations drm_connector_fops = {
> .write = connector_write
> };
>
> -#define HDMI_MAX_INFOFRAME_SIZE 29
> -
> static ssize_t
> audio_infoframe_read(struct file *filp, char __user *ubuf, size_t count, loff_t *ppos)
> {
> @@ -579,7 +577,7 @@ static ssize_t _f##_read_infoframe(struct file *filp, \
> struct drm_connector *connector; \
> union hdmi_infoframe *frame; \
> struct drm_device *dev; \
> - u8 buf[HDMI_MAX_INFOFRAME_SIZE]; \
> + u8 buf[HDMI_INFOFRAME_SIZE(MAX)]; \
> ssize_t len = 0; \
> \
> connector = filp->private_data; \
> diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
> index 3bb87bf6bc65..455f855bc084 100644
> --- a/include/linux/hdmi.h
> +++ b/include/linux/hdmi.h
> @@ -59,6 +59,15 @@ enum hdmi_infoframe_type {
> #define HDMI_DRM_INFOFRAME_SIZE 26
> #define HDMI_VENDOR_INFOFRAME_SIZE 4
>
> +/*
> + * HDMI 1.3a table 5-14 states that the largest InfoFrame_length is 27,
> + * not including the packet header or checksum byte. We include the
> + * checksum byte in HDMI_INFOFRAME_HEADER_SIZE, so this should allow
> + * HDMI_INFOFRAME_SIZE(MAX) to be the largest buffer we could ever need
> + * for any HDMI infoframe.
> + */
> +#define HDMI_MAX_INFOFRAME_SIZE 27
> +
> #define HDMI_INFOFRAME_SIZE(type) \
> (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes
2024-08-28 8:31 ` Jani Nikula
@ 2024-09-16 11:44 ` Derek Foreman
2024-09-17 8:12 ` Jani Nikula
0 siblings, 1 reply; 7+ messages in thread
From: Derek Foreman @ 2024-09-16 11:44 UTC (permalink / raw)
To: Jani Nikula, dri-devel; +Cc: Maxime Ripard, kernel, Helge Deller, linux-fbdev
Gentle ping - is there anything more I need to do before this can land?
Thanks,
Derek
On 2024-08-28 03:31, Jani Nikula wrote:
> On Tue, 27 Aug 2024, Derek Foreman <derek.foreman@collabora.com> wrote:
>> The largest infoframe we create is the DRM (Dynamic Range Mastering)
>> infoframe which is 26 bytes + a 4 byte header, for a total of 30
>> bytes.
>>
>> With HDMI_MAX_INFOFRAME_SIZE set to 29 bytes, as it is now, we
>> allocate too little space to pack a DRM infoframe in
>> write_device_infoframe(), leading to an ENOSPC return from
>> hdmi_infoframe_pack(), and never calling the connector's
>> write_infoframe() vfunc.
>>
>> Instead of having HDMI_MAX_INFOFRAME_SIZE defined in two places,
>> replace HDMI_MAX_INFOFRAME_SIZE with HDMI_INFOFRAME_SIZE(MAX) and make
>> MAX 27 bytes - which is defined by the HDMI specification to be the
>> largest infoframe payload.
>>
>> Fixes: f378b77227bc ("drm/connector: hdmi: Add Infoframes generation")
>> Fixes: c602e4959a0c ("drm/connector: hdmi: Create Infoframe DebugFS entries")
>>
> Superfluous blank line. Can be fixed while applying.
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
>
>> Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
>> ---
>> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 4 +---
>> drivers/gpu/drm/drm_debugfs.c | 4 +---
>> include/linux/hdmi.h | 9 +++++++++
>> 3 files changed, 11 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
>> index 7854820089ec..feb7a3a75981 100644
>> --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
>> +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
>> @@ -521,8 +521,6 @@ int drm_atomic_helper_connector_hdmi_check(struct drm_connector *connector,
>> }
>> EXPORT_SYMBOL(drm_atomic_helper_connector_hdmi_check);
>>
>> -#define HDMI_MAX_INFOFRAME_SIZE 29
>> -
>> static int clear_device_infoframe(struct drm_connector *connector,
>> enum hdmi_infoframe_type type)
>> {
>> @@ -563,7 +561,7 @@ static int write_device_infoframe(struct drm_connector *connector,
>> {
>> const struct drm_connector_hdmi_funcs *funcs = connector->hdmi.funcs;
>> struct drm_device *dev = connector->dev;
>> - u8 buffer[HDMI_MAX_INFOFRAME_SIZE];
>> + u8 buffer[HDMI_INFOFRAME_SIZE(MAX)];
>> int ret;
>> int len;
>>
>> diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
>> index 6b239a24f1df..9d3e6dd68810 100644
>> --- a/drivers/gpu/drm/drm_debugfs.c
>> +++ b/drivers/gpu/drm/drm_debugfs.c
>> @@ -520,8 +520,6 @@ static const struct file_operations drm_connector_fops = {
>> .write = connector_write
>> };
>>
>> -#define HDMI_MAX_INFOFRAME_SIZE 29
>> -
>> static ssize_t
>> audio_infoframe_read(struct file *filp, char __user *ubuf, size_t count, loff_t *ppos)
>> {
>> @@ -579,7 +577,7 @@ static ssize_t _f##_read_infoframe(struct file *filp, \
>> struct drm_connector *connector; \
>> union hdmi_infoframe *frame; \
>> struct drm_device *dev; \
>> - u8 buf[HDMI_MAX_INFOFRAME_SIZE]; \
>> + u8 buf[HDMI_INFOFRAME_SIZE(MAX)]; \
>> ssize_t len = 0; \
>> \
>> connector = filp->private_data; \
>> diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
>> index 3bb87bf6bc65..455f855bc084 100644
>> --- a/include/linux/hdmi.h
>> +++ b/include/linux/hdmi.h
>> @@ -59,6 +59,15 @@ enum hdmi_infoframe_type {
>> #define HDMI_DRM_INFOFRAME_SIZE 26
>> #define HDMI_VENDOR_INFOFRAME_SIZE 4
>>
>> +/*
>> + * HDMI 1.3a table 5-14 states that the largest InfoFrame_length is 27,
>> + * not including the packet header or checksum byte. We include the
>> + * checksum byte in HDMI_INFOFRAME_HEADER_SIZE, so this should allow
>> + * HDMI_INFOFRAME_SIZE(MAX) to be the largest buffer we could ever need
>> + * for any HDMI infoframe.
>> + */
>> +#define HDMI_MAX_INFOFRAME_SIZE 27
>> +
>> #define HDMI_INFOFRAME_SIZE(type) \
>> (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes
2024-09-16 11:44 ` Derek Foreman
@ 2024-09-17 8:12 ` Jani Nikula
0 siblings, 0 replies; 7+ messages in thread
From: Jani Nikula @ 2024-09-17 8:12 UTC (permalink / raw)
To: Derek Foreman, dri-devel
Cc: Maxime Ripard, kernel, Helge Deller, linux-fbdev,
Thomas Zimmermann, Maarten Lankhorst
On Mon, 16 Sep 2024, Derek Foreman <derek.foreman@collabora.com> wrote:
> Gentle ping - is there anything more I need to do before this can land?
I don't think so. FWIW, I bounced this to intel-gfx and got passing CI
results too.
Cc: drm-misc maintainers. Just wondering where to merge this. It's a fix
to commits in v6.11. Are you still planning on a drm-misc-next-fixes
pull request for v6.12-rc1? That would be the quickest way to get this
upstream.
BR,
Jani.
>
> Thanks,
> Derek
>
> On 2024-08-28 03:31, Jani Nikula wrote:
>> On Tue, 27 Aug 2024, Derek Foreman <derek.foreman@collabora.com> wrote:
>>> The largest infoframe we create is the DRM (Dynamic Range Mastering)
>>> infoframe which is 26 bytes + a 4 byte header, for a total of 30
>>> bytes.
>>>
>>> With HDMI_MAX_INFOFRAME_SIZE set to 29 bytes, as it is now, we
>>> allocate too little space to pack a DRM infoframe in
>>> write_device_infoframe(), leading to an ENOSPC return from
>>> hdmi_infoframe_pack(), and never calling the connector's
>>> write_infoframe() vfunc.
>>>
>>> Instead of having HDMI_MAX_INFOFRAME_SIZE defined in two places,
>>> replace HDMI_MAX_INFOFRAME_SIZE with HDMI_INFOFRAME_SIZE(MAX) and make
>>> MAX 27 bytes - which is defined by the HDMI specification to be the
>>> largest infoframe payload.
>>>
>>> Fixes: f378b77227bc ("drm/connector: hdmi: Add Infoframes generation")
>>> Fixes: c602e4959a0c ("drm/connector: hdmi: Create Infoframe DebugFS entries")
>>>
>> Superfluous blank line. Can be fixed while applying.
>>
>> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>>
>>
>>> Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
>>> ---
>>> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 4 +---
>>> drivers/gpu/drm/drm_debugfs.c | 4 +---
>>> include/linux/hdmi.h | 9 +++++++++
>>> 3 files changed, 11 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
>>> index 7854820089ec..feb7a3a75981 100644
>>> --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
>>> +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
>>> @@ -521,8 +521,6 @@ int drm_atomic_helper_connector_hdmi_check(struct drm_connector *connector,
>>> }
>>> EXPORT_SYMBOL(drm_atomic_helper_connector_hdmi_check);
>>>
>>> -#define HDMI_MAX_INFOFRAME_SIZE 29
>>> -
>>> static int clear_device_infoframe(struct drm_connector *connector,
>>> enum hdmi_infoframe_type type)
>>> {
>>> @@ -563,7 +561,7 @@ static int write_device_infoframe(struct drm_connector *connector,
>>> {
>>> const struct drm_connector_hdmi_funcs *funcs = connector->hdmi.funcs;
>>> struct drm_device *dev = connector->dev;
>>> - u8 buffer[HDMI_MAX_INFOFRAME_SIZE];
>>> + u8 buffer[HDMI_INFOFRAME_SIZE(MAX)];
>>> int ret;
>>> int len;
>>>
>>> diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
>>> index 6b239a24f1df..9d3e6dd68810 100644
>>> --- a/drivers/gpu/drm/drm_debugfs.c
>>> +++ b/drivers/gpu/drm/drm_debugfs.c
>>> @@ -520,8 +520,6 @@ static const struct file_operations drm_connector_fops = {
>>> .write = connector_write
>>> };
>>>
>>> -#define HDMI_MAX_INFOFRAME_SIZE 29
>>> -
>>> static ssize_t
>>> audio_infoframe_read(struct file *filp, char __user *ubuf, size_t count, loff_t *ppos)
>>> {
>>> @@ -579,7 +577,7 @@ static ssize_t _f##_read_infoframe(struct file *filp, \
>>> struct drm_connector *connector; \
>>> union hdmi_infoframe *frame; \
>>> struct drm_device *dev; \
>>> - u8 buf[HDMI_MAX_INFOFRAME_SIZE]; \
>>> + u8 buf[HDMI_INFOFRAME_SIZE(MAX)]; \
>>> ssize_t len = 0; \
>>> \
>>> connector = filp->private_data; \
>>> diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
>>> index 3bb87bf6bc65..455f855bc084 100644
>>> --- a/include/linux/hdmi.h
>>> +++ b/include/linux/hdmi.h
>>> @@ -59,6 +59,15 @@ enum hdmi_infoframe_type {
>>> #define HDMI_DRM_INFOFRAME_SIZE 26
>>> #define HDMI_VENDOR_INFOFRAME_SIZE 4
>>>
>>> +/*
>>> + * HDMI 1.3a table 5-14 states that the largest InfoFrame_length is 27,
>>> + * not including the packet header or checksum byte. We include the
>>> + * checksum byte in HDMI_INFOFRAME_HEADER_SIZE, so this should allow
>>> + * HDMI_INFOFRAME_SIZE(MAX) to be the largest buffer we could ever need
>>> + * for any HDMI infoframe.
>>> + */
>>> +#define HDMI_MAX_INFOFRAME_SIZE 27
>>> +
>>> #define HDMI_INFOFRAME_SIZE(type) \
>>> (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes
2024-08-27 16:39 [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes Derek Foreman
2024-08-27 16:42 ` Maxime Ripard
2024-08-28 8:31 ` Jani Nikula
@ 2024-09-24 14:13 ` Maxime Ripard
2024-09-24 14:21 ` Dmitry Baryshkov
2 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2024-09-24 14:13 UTC (permalink / raw)
To: dri-devel, Derek Foreman; +Cc: kernel, Jani Nikula, Helge Deller, linux-fbdev
On Tue, 27 Aug 2024 11:39:04 -0500, Derek Foreman wrote:
> The largest infoframe we create is the DRM (Dynamic Range Mastering)
> infoframe which is 26 bytes + a 4 byte header, for a total of 30
> bytes.
>
> With HDMI_MAX_INFOFRAME_SIZE set to 29 bytes, as it is now, we
> allocate too little space to pack a DRM infoframe in
> write_device_infoframe(), leading to an ENOSPC return from
> hdmi_infoframe_pack(), and never calling the connector's
> write_infoframe() vfunc.
>
> [...]
Applied to misc/kernel.git (drm-misc-fixes).
Thanks!
Maxime
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes
2024-09-24 14:13 ` Maxime Ripard
@ 2024-09-24 14:21 ` Dmitry Baryshkov
0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2024-09-24 14:21 UTC (permalink / raw)
To: Maxime Ripard
Cc: dri-devel, Derek Foreman, kernel, Jani Nikula, Helge Deller,
linux-fbdev
On Tue, Sep 24, 2024 at 04:13:08PM GMT, Maxime Ripard wrote:
> On Tue, 27 Aug 2024 11:39:04 -0500, Derek Foreman wrote:
> > The largest infoframe we create is the DRM (Dynamic Range Mastering)
> > infoframe which is 26 bytes + a 4 byte header, for a total of 30
> > bytes.
> >
> > With HDMI_MAX_INFOFRAME_SIZE set to 29 bytes, as it is now, we
> > allocate too little space to pack a DRM infoframe in
> > write_device_infoframe(), leading to an ENOSPC return from
> > hdmi_infoframe_pack(), and never calling the connector's
> > write_infoframe() vfunc.
> >
> > [...]
>
> Applied to misc/kernel.git (drm-misc-fixes).
With an empty line between Fixes and the rest of the tags :-(
>
> Thanks!
> Maxime
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-09-24 14:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 16:39 [PATCH v4] drm/connector: hdmi: Fix writing Dynamic Range Mastering infoframes Derek Foreman
2024-08-27 16:42 ` Maxime Ripard
2024-08-28 8:31 ` Jani Nikula
2024-09-16 11:44 ` Derek Foreman
2024-09-17 8:12 ` Jani Nikula
2024-09-24 14:13 ` Maxime Ripard
2024-09-24 14:21 ` Dmitry Baryshkov
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).