From: Mark Brown <broonie@kernel•org>
To: Dave Airlie <airlied@redhat•com>, DRI <dri-devel@lists•freedesktop.org>
Cc: Christian Hewitt <christianshewitt@gmail•com>,
Cristian Ciocaltea <cristian.ciocaltea@collabora•com>,
Daniel Stone <daniels@collabora•com>,
Jonas Karlman <jonas@kwiboo•se>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Luca Ceresoli <luca.ceresoli@bootlin•com>
Subject: linux-next: manual merge of the drm tree with the drm-misc-fixes tree
Date: Wed, 18 Mar 2026 14:36:17 +0000 [thread overview]
Message-ID: <abq4YV8QgsmpUoHI@sirena.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 11161 bytes --]
Hi all,
Today's linux-next merge of the drm tree got a conflict in:
drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
between commit:
cffcb42c57686 ("drm/bridge: dw-hdmi-qp: fix multi-channel audio output")
from the drm-misc-fixes tree and commit:
3ea699b56d31c ("drm/bridge: dw-hdmi-qp: Rework Audio InfoFrame handler")
from the drm tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
index facfb7526928d,d649a1cf07f5c..0000000000000
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
@@@ -11,6 -11,7 +11,7 @@@
#include <linux/export.h>
#include <linux/i2c.h>
#include <linux/irq.h>
+ #include <linux/minmax.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
@@@ -748,120 -749,6 +749,6 @@@ static struct i2c_adapter *dw_hdmi_qp_i
return adap;
}
- static int dw_hdmi_qp_config_avi_infoframe(struct dw_hdmi_qp *hdmi,
- const u8 *buffer, size_t len)
- {
- u32 val, i, j;
-
- if (len != HDMI_INFOFRAME_SIZE(AVI)) {
- dev_err(hdmi->dev, "failed to configure avi infoframe\n");
- return -EINVAL;
- }
-
- /*
- * DW HDMI QP IP uses a different byte format from standard AVI info
- * frames, though generally the bits are in the correct bytes.
- */
- val = buffer[1] << 8 | buffer[2] << 16;
- dw_hdmi_qp_write(hdmi, val, PKT_AVI_CONTENTS0);
-
- for (i = 0; i < 4; i++) {
- for (j = 0; j < 4; j++) {
- if (i * 4 + j >= 14)
- break;
- if (!j)
- val = buffer[i * 4 + j + 3];
- val |= buffer[i * 4 + j + 3] << (8 * j);
- }
-
- dw_hdmi_qp_write(hdmi, val, PKT_AVI_CONTENTS1 + i * 4);
- }
-
- dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_AVI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
-
- dw_hdmi_qp_mod(hdmi, PKTSCHED_AVI_TX_EN | PKTSCHED_GCP_TX_EN,
- PKTSCHED_AVI_TX_EN | PKTSCHED_GCP_TX_EN, PKTSCHED_PKT_EN);
-
- return 0;
- }
-
- static int dw_hdmi_qp_config_drm_infoframe(struct dw_hdmi_qp *hdmi,
- const u8 *buffer, size_t len)
- {
- u32 val, i;
-
- if (len != HDMI_INFOFRAME_SIZE(DRM)) {
- dev_err(hdmi->dev, "failed to configure drm infoframe\n");
- return -EINVAL;
- }
-
- dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_DRMI_TX_EN, PKTSCHED_PKT_EN);
-
- val = buffer[1] << 8 | buffer[2] << 16;
- dw_hdmi_qp_write(hdmi, val, PKT_DRMI_CONTENTS0);
-
- for (i = 0; i <= buffer[2]; i++) {
- if (i % 4 == 0)
- val = buffer[3 + i];
- val |= buffer[3 + i] << ((i % 4) * 8);
-
- if ((i % 4 == 3) || i == buffer[2])
- dw_hdmi_qp_write(hdmi, val,
- PKT_DRMI_CONTENTS1 + ((i / 4) * 4));
- }
-
- dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_DRMI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
- dw_hdmi_qp_mod(hdmi, PKTSCHED_DRMI_TX_EN, PKTSCHED_DRMI_TX_EN,
- PKTSCHED_PKT_EN);
-
- return 0;
- }
-
- /*
- * Static values documented in the TRM
- * Different values are only used for debug purposes
- */
- #define DW_HDMI_QP_AUDIO_INFOFRAME_HB1 0x1
- #define DW_HDMI_QP_AUDIO_INFOFRAME_HB2 0xa
-
- static int dw_hdmi_qp_config_audio_infoframe(struct dw_hdmi_qp *hdmi,
- const u8 *buffer, size_t len)
- {
- /*
- * AUDI_CONTENTS0: { RSV, HB2, HB1, RSV }
- * AUDI_CONTENTS1: { PB3, PB2, PB1, PB0 }
- * AUDI_CONTENTS2: { PB7, PB6, PB5, PB4 }
- *
- * PB0: CheckSum
- * PB1: | CT3 | CT2 | CT1 | CT0 | F13 | CC2 | CC1 | CC0 |
- * PB2: | F27 | F26 | F25 | SF2 | SF1 | SF0 | SS1 | SS0 |
- * PB3: | F37 | F36 | F35 | F34 | F33 | F32 | F31 | F30 |
- * PB4: | CA7 | CA6 | CA5 | CA4 | CA3 | CA2 | CA1 | CA0 |
- * PB5: | DM_INH | LSV3 | LSV2 | LSV1 | LSV0 | F52 | F51 | F50 |
- * PB6~PB10: Reserved
- *
- * AUDI_CONTENTS0 default value defined by HDMI specification,
- * and shall only be changed for debug purposes.
- */
- u32 header_bytes = (DW_HDMI_QP_AUDIO_INFOFRAME_HB1 << 8) |
- (DW_HDMI_QP_AUDIO_INFOFRAME_HB2 << 16);
-
- regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS0, &header_bytes, 1);
- regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS1, &buffer[3], 1);
- regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS2, &buffer[7], 1);
-
- /* Enable ACR, AUDI, AMD */
- dw_hdmi_qp_mod(hdmi,
- PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
- PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
- PKTSCHED_PKT_EN);
-
- /* Enable AUDS */
- dw_hdmi_qp_mod(hdmi, PKTSCHED_AUDS_TX_EN, PKTSCHED_AUDS_TX_EN, PKTSCHED_PKT_EN);
-
- return 0;
- }
-
static void dw_hdmi_qp_bridge_atomic_enable(struct drm_bridge *bridge,
struct drm_atomic_state *state)
{
@@@ -970,9 -857,9 +857,9 @@@ static int dw_hdmi_qp_bridge_clear_avi_
static int dw_hdmi_qp_bridge_clear_hdmi_infoframe(struct drm_bridge *bridge)
{
- /* FIXME: add support for this InfoFrame */
+ struct dw_hdmi_qp *hdmi = bridge->driver_private;
- drm_warn_once(bridge->encoder->dev, "HDMI VSI not supported\n");
+ dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_VSI_TX_EN, PKTSCHED_PKT_EN);
return 0;
}
@@@ -986,6 -873,15 +873,15 @@@ static int dw_hdmi_qp_bridge_clear_hdr_
return 0;
}
+ static int dw_hdmi_qp_bridge_clear_spd_infoframe(struct drm_bridge *bridge)
+ {
+ struct dw_hdmi_qp *hdmi = bridge->driver_private;
+
+ dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_SPDI_TX_EN, PKTSCHED_PKT_EN);
+
+ return 0;
+ }
+
static int dw_hdmi_qp_bridge_clear_audio_infoframe(struct drm_bridge *bridge)
{
struct dw_hdmi_qp *hdmi = bridge->driver_private;
@@@ -999,6 -895,32 +895,32 @@@
return 0;
}
+ static void dw_hdmi_qp_write_pkt(struct dw_hdmi_qp *hdmi, const u8 *buffer,
+ size_t start, size_t len, unsigned int reg)
+ {
+ u32 val = 0;
+ size_t i;
+
+ for (i = start; i < start + len; i++)
+ val |= buffer[i] << ((i % 4) * BITS_PER_BYTE);
+
+ dw_hdmi_qp_write(hdmi, val, reg);
+ }
+
+ static void dw_hdmi_qp_write_infoframe(struct dw_hdmi_qp *hdmi, const u8 *buffer,
+ size_t len, unsigned int reg)
+ {
+ size_t i;
+
+ /* InfoFrame packet header */
+ dw_hdmi_qp_write_pkt(hdmi, buffer, 1, 2, reg);
+
+ /* InfoFrame packet body */
+ for (i = 0; i < len - 3; i += 4)
+ dw_hdmi_qp_write_pkt(hdmi, buffer + 3, i, min(len - i - 3, 4),
+ reg + i + 4);
+ }
+
static int dw_hdmi_qp_bridge_write_avi_infoframe(struct drm_bridge *bridge,
const u8 *buffer, size_t len)
{
@@@ -1006,15 -928,27 +928,27 @@@
dw_hdmi_qp_bridge_clear_avi_infoframe(bridge);
- return dw_hdmi_qp_config_avi_infoframe(hdmi, buffer, len);
+ dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_AVI_CONTENTS0);
+
+ dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_AVI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
+ dw_hdmi_qp_mod(hdmi, PKTSCHED_AVI_TX_EN | PKTSCHED_GCP_TX_EN,
+ PKTSCHED_AVI_TX_EN | PKTSCHED_GCP_TX_EN, PKTSCHED_PKT_EN);
+
+ return 0;
}
static int dw_hdmi_qp_bridge_write_hdmi_infoframe(struct drm_bridge *bridge,
const u8 *buffer, size_t len)
{
+ struct dw_hdmi_qp *hdmi = bridge->driver_private;
+
dw_hdmi_qp_bridge_clear_hdmi_infoframe(bridge);
- /* FIXME: add support for the HDMI VSI */
+ dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_VSI_CONTENTS0);
+
+ dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_VSI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
+ dw_hdmi_qp_mod(hdmi, PKTSCHED_VSI_TX_EN, PKTSCHED_VSI_TX_EN,
+ PKTSCHED_PKT_EN);
return 0;
}
@@@ -1026,7 -960,28 +960,28 @@@ static int dw_hdmi_qp_bridge_write_hdr_
dw_hdmi_qp_bridge_clear_hdr_drm_infoframe(bridge);
- return dw_hdmi_qp_config_drm_infoframe(hdmi, buffer, len);
+ dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_DRMI_CONTENTS0);
+
+ dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_DRMI_FIELDRATE, PKTSCHED_PKT_CONFIG1);
+ dw_hdmi_qp_mod(hdmi, PKTSCHED_DRMI_TX_EN, PKTSCHED_DRMI_TX_EN,
+ PKTSCHED_PKT_EN);
+
+ return 0;
+ }
+
+ static int dw_hdmi_qp_bridge_write_spd_infoframe(struct drm_bridge *bridge,
+ const u8 *buffer, size_t len)
+ {
+ struct dw_hdmi_qp *hdmi = bridge->driver_private;
+
+ dw_hdmi_qp_bridge_clear_spd_infoframe(bridge);
+
+ dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_SPDI_CONTENTS0);
+
+ dw_hdmi_qp_mod(hdmi, PKTSCHED_SPDI_TX_EN, PKTSCHED_SPDI_TX_EN,
+ PKTSCHED_PKT_EN);
+
+ return 0;
}
static int dw_hdmi_qp_bridge_write_audio_infoframe(struct drm_bridge *bridge,
@@@ -1036,7 -991,31 +991,31 @@@
dw_hdmi_qp_bridge_clear_audio_infoframe(bridge);
- return dw_hdmi_qp_config_audio_infoframe(hdmi, buffer, len);
+ /*
+ * AUDI_CONTENTS0: { RSV, HB2, HB1, RSV }
+ * AUDI_CONTENTS1: { PB3, PB2, PB1, PB0 }
+ * AUDI_CONTENTS2: { PB7, PB6, PB5, PB4 }
+ *
+ * PB0: CheckSum
+ * PB1: | CT3 | CT2 | CT1 | CT0 | F13 | CC2 | CC1 | CC0 |
+ * PB2: | F27 | F26 | F25 | SF2 | SF1 | SF0 | SS1 | SS0 |
+ * PB3: | F37 | F36 | F35 | F34 | F33 | F32 | F31 | F30 |
+ * PB4: | CA7 | CA6 | CA5 | CA4 | CA3 | CA2 | CA1 | CA0 |
+ * PB5: | DM_INH | LSV3 | LSV2 | LSV1 | LSV0 | F52 | F51 | F50 |
+ * PB6~PB10: Reserved
+ */
+ dw_hdmi_qp_write_infoframe(hdmi, buffer, len, PKT_AUDI_CONTENTS0);
+
+ /* Enable ACR, AUDI, AMD */
+ dw_hdmi_qp_mod(hdmi,
+ PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
+ PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
+ PKTSCHED_PKT_EN);
+
+ /* Enable AUDS */
+ dw_hdmi_qp_mod(hdmi, PKTSCHED_AUDS_TX_EN, PKTSCHED_AUDS_TX_EN, PKTSCHED_PKT_EN);
+
+ return 0;
}
#ifdef CONFIG_DRM_DW_HDMI_QP_CEC
@@@ -1227,6 -1206,8 +1206,8 @@@ static const struct drm_bridge_funcs dw
.hdmi_write_hdmi_infoframe = dw_hdmi_qp_bridge_write_hdmi_infoframe,
.hdmi_clear_hdr_drm_infoframe = dw_hdmi_qp_bridge_clear_hdr_drm_infoframe,
.hdmi_write_hdr_drm_infoframe = dw_hdmi_qp_bridge_write_hdr_drm_infoframe,
+ .hdmi_clear_spd_infoframe = dw_hdmi_qp_bridge_clear_spd_infoframe,
+ .hdmi_write_spd_infoframe = dw_hdmi_qp_bridge_write_spd_infoframe,
.hdmi_clear_audio_infoframe = dw_hdmi_qp_bridge_clear_audio_infoframe,
.hdmi_write_audio_infoframe = dw_hdmi_qp_bridge_write_audio_infoframe,
.hdmi_audio_startup = dw_hdmi_qp_audio_enable,
@@@ -1344,7 -1325,8 +1325,8 @@@ struct dw_hdmi_qp *dw_hdmi_qp_bind(stru
DRM_BRIDGE_OP_EDID |
DRM_BRIDGE_OP_HDMI |
DRM_BRIDGE_OP_HDMI_AUDIO |
- DRM_BRIDGE_OP_HDMI_HDR_DRM_INFOFRAME;
+ DRM_BRIDGE_OP_HDMI_HDR_DRM_INFOFRAME |
+ DRM_BRIDGE_OP_HDMI_SPD_INFOFRAME;
if (!hdmi->no_hpd)
hdmi->bridge.ops |= DRM_BRIDGE_OP_HPD;
hdmi->bridge.of_node = pdev->dev.of_node;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-03-18 14:36 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 14:36 Mark Brown [this message]
2026-03-18 15:49 ` linux-next: manual merge of the drm tree with the drm-misc-fixes tree Luca Ceresoli
2026-03-18 18:20 ` Cristian Ciocaltea
-- strict thread matches above, loose matches on Subject: below --
2026-03-20 14:17 Mark Brown
2026-03-20 15:39 ` Boris Brezillon
2026-04-08 17:26 ` Mark Brown
2026-04-09 7:47 ` Boris Brezillon
2026-01-05 2:21 Stephen Rothwell
2025-08-20 1:21 Stephen Rothwell
2025-08-20 10:30 ` Danilo Krummrich
2025-08-20 21:29 ` Stephen Rothwell
2025-07-18 4:41 Stephen Rothwell
2025-07-18 6:27 ` Thomas Zimmermann
2025-01-14 1:30 Stephen Rothwell
2023-11-22 0:29 Stephen Rothwell
2023-11-28 10:04 ` Geert Uytterhoeven
2023-09-28 2:05 Stephen Rothwell
2023-06-27 1:54 Stephen Rothwell
2023-07-11 1:17 ` Stephen Rothwell
2022-11-21 2:06 Stephen Rothwell
2022-07-11 2:47 Stephen Rothwell
2022-07-11 8:05 ` Christian König
2022-07-17 23:44 ` Stephen Rothwell
2022-07-19 7:35 ` Geert Uytterhoeven
2022-07-27 2:55 ` Stephen Rothwell
2022-07-27 3:24 ` Dave Airlie
2022-07-27 5:37 ` Stephen Rothwell
2022-03-18 0:55 Stephen Rothwell
2022-03-18 1:06 ` Stephen Rothwell
2021-12-22 3:50 Stephen Rothwell
2021-12-22 7:31 ` Christian König
2021-11-29 23:33 Stephen Rothwell
2021-11-30 8:58 ` Maxime Ripard
2021-11-30 20:35 ` Stephen Rothwell
2021-10-22 0:53 Stephen Rothwell
2021-06-17 1:42 Stephen Rothwell
2021-04-09 3:12 Stephen Rothwell
2021-03-18 1:02 Stephen Rothwell
2021-03-18 6:51 ` Tomi Valkeinen
2020-07-28 3:41 Stephen Rothwell
2020-05-01 3:45 Stephen Rothwell
2020-03-01 23:43 Stephen Rothwell
2019-09-15 21:18 Mark Brown
2019-09-16 5:29 ` Vasily Khoruzhick
2019-09-17 2:43 ` Qiang Yu
2019-08-26 3:06 Stephen Rothwell
2019-08-29 10:11 ` james qian wang (Arm Technology China)
2018-11-26 2:37 Stephen Rothwell
2018-03-08 0:47 Stephen Rothwell
2017-12-13 23:59 Stephen Rothwell
2017-01-17 0:59 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abq4YV8QgsmpUoHI@sirena.org.uk \
--to=broonie@kernel$(echo .)org \
--cc=airlied@redhat$(echo .)com \
--cc=christianshewitt@gmail$(echo .)com \
--cc=cristian.ciocaltea@collabora$(echo .)com \
--cc=daniels@collabora$(echo .)com \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=jonas@kwiboo$(echo .)se \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=luca.ceresoli@bootlin$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox