From: Jani Nikula <jani.nikula@intel.com>
To: Jani Nikula <jani.nikula@intel.com>, dri-devel@lists.freedesktop.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
intel-gfx@lists.freedesktop.org, linux-media@vger.kernel.org
Subject: [Intel-gfx] [PATCH v2] media: cec: core: add note about *_from_edid() function usage in drm
Date: Thu, 31 Aug 2023 13:51:44 +0300 [thread overview]
Message-ID: <20230831105144.25923-1-jani.nikula@intel.com> (raw)
In-Reply-To: <7cebfea8f999d2d0d49533f9849d109830c5d1b6.1692884619.git.jani.nikula@intel.com>
In the drm subsystem, the source physical address is, in most cases,
available without having to parse the EDID again. Add notes about
preferring to use the pre-parsed address instead.
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
v2: rephrase comments, in particular indicate cec_s_phys_addr() should
be false (Hans)
---
drivers/media/cec/core/cec-adap.c | 5 +++++
drivers/media/cec/core/cec-notifier.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/drivers/media/cec/core/cec-adap.c b/drivers/media/cec/core/cec-adap.c
index 241b1621b197..1109af525c35 100644
--- a/drivers/media/cec/core/cec-adap.c
+++ b/drivers/media/cec/core/cec-adap.c
@@ -1688,6 +1688,11 @@ void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block)
}
EXPORT_SYMBOL_GPL(cec_s_phys_addr);
+/*
+ * Note: In the drm subsystem, prefer calling (if possible):
+ *
+ * cec_s_phys_addr(adap, connector->display_info.source_physical_address, false);
+ */
void cec_s_phys_addr_from_edid(struct cec_adapter *adap,
const struct edid *edid)
{
diff --git a/drivers/media/cec/core/cec-notifier.c b/drivers/media/cec/core/cec-notifier.c
index 389dc664b211..d600be0f7b67 100644
--- a/drivers/media/cec/core/cec-notifier.c
+++ b/drivers/media/cec/core/cec-notifier.c
@@ -195,6 +195,11 @@ void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa)
}
EXPORT_SYMBOL_GPL(cec_notifier_set_phys_addr);
+/*
+ * Note: In the drm subsystem, prefer calling (if possible):
+ *
+ * cec_notifier_set_phys_addr(n, connector->display_info.source_physical_address);
+ */
void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n,
const struct edid *edid)
{
--
2.39.2
next prev parent reply other threads:[~2023-08-31 10:51 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 13:46 [Intel-gfx] [PATCH 0/6] drm, cec and edid updates Jani Nikula
2023-08-24 13:46 ` [Intel-gfx] [PATCH 1/6] drm/edid: add drm_edid_is_digital() Jani Nikula
2023-08-31 17:23 ` Ville Syrjälä
2023-09-01 19:26 ` Alex Deucher
2023-09-04 10:43 ` Jani Nikula
2023-08-24 13:46 ` [Intel-gfx] [PATCH 2/6] drm/i915/display: use drm_edid_is_digital() Jani Nikula
2023-08-31 17:24 ` Ville Syrjälä
2023-08-24 13:46 ` [Intel-gfx] [PATCH 3/6] drm/edid: parse source physical address Jani Nikula
2023-08-30 9:54 ` Hans Verkuil
2023-08-24 13:46 ` [Intel-gfx] [PATCH 4/6] drm/cec: add drm_dp_cec_attach() as the non-edid version of set edid Jani Nikula
2023-08-25 11:23 ` kernel test robot
2023-08-25 11:23 ` kernel test robot
2023-08-25 13:01 ` [Intel-gfx] [PATCH v2] " Jani Nikula
2023-08-30 10:26 ` Hans Verkuil
2023-08-30 9:57 ` [Intel-gfx] [PATCH 4/6] " Hans Verkuil
2023-08-30 10:23 ` Jani Nikula
2023-08-24 13:46 ` [Intel-gfx] [PATCH 5/6] drm/i915/cec: switch to setting physical address directly Jani Nikula
2023-08-30 9:57 ` Hans Verkuil
2023-08-24 13:46 ` [Intel-gfx] [PATCH 6/6] media: cec: core: add note about *_from_edid() function usage in drm Jani Nikula
2023-08-30 10:03 ` Hans Verkuil
2023-08-31 10:52 ` Jani Nikula
2023-08-31 10:51 ` Jani Nikula [this message]
2023-08-31 11:38 ` [Intel-gfx] [PATCH v2] " Hans Verkuil
2023-08-24 19:59 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm, cec and edid updates Patchwork
2023-08-24 20:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-25 9:10 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-08-25 16:17 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm, cec and edid updates (rev2) Patchwork
2023-08-25 16:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-26 8:15 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-08-31 14:29 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm, cec and edid updates (rev3) Patchwork
2023-08-31 14:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-31 18:48 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-08-31 18:51 ` [Intel-gfx] [PATCH 0/6] drm, cec and edid updates Jani Nikula
2023-08-31 21:32 ` Hans Verkuil
2023-09-01 7:24 ` Maxime Ripard
2023-09-01 8:57 ` Jani Nikula
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=20230831105144.25923-1-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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