From: Jani Nikula <jani.nikula@linux.intel.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH RFC 0/7] drm/display: dp: add new DPCD access functions
Date: Thu, 23 Jan 2025 12:12:43 +0200 [thread overview]
Message-ID: <87r04tn8is.fsf@intel.com> (raw)
In-Reply-To: <ctla3nt6o3osdxek63zyidyuofzgq3mgshh2azong3ntcqevhi@3rrzr3hrzbor>
On Thu, 23 Jan 2025, Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote:
> On Fri, Jan 17, 2025 at 10:56:35AM +0200, Dmitry Baryshkov wrote:
>> Existing DPCD access functions return an error code or the number of
>> bytes being read / write in case of partial access. However a lot of
>> drivers either (incorrectly) ignore partial access or mishandle error
>> codes. In other cases this results in a boilerplate code which compares
>> returned value with the size.
>>
>> As suggested by Jani implement new set of DPCD access helpers, which
>> ignore partial access, always return 0 or an error code. Reimplement
>> existing helpers using the new functions to ensure backwards
>> compatibility.
>>
>> This series targets only the DRM helpers code. If the approach is found
>> to be acceptable, each of the drivers should be converted on its own.
>
> Gracious ping for the series, it's been posted a week ago.
It's a bit of a bummer the names become longer. I don't have a better
suggestion, though.
I do like it that the error handling becomes easier and more uniform
overall, and this actually fixes many places that only checked for < 0
with the old functions.
I glanced through the series, I didn't spot anything obviously wrong,
but didn't do a thorough review either. I can do once we have wider
buy-in for the idea in general, so the effort won't be wasted.
For now,
Acked-by: Jani Nikula <jani.nikula@intel.com>
>
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>> Dmitry Baryshkov (7):
>> drm/display: dp: change drm_dp_dpcd_read_link_status() return
>> drm/display: dp: implement new access helpers
>> drm/display: dp: use new DCPD access helpers
>> drm/display: dp-aux-dev: use new DCPD access helpers
>> drm/display: dp-cec: use new DCPD access helpers
>> drm/display: dp-mst-topology: use new DCPD access helpers
>> drm/display: dp-tunnel: use new DCPD access helpers
>>
>> drivers/gpu/drm/display/drm_dp_aux_dev.c | 12 +-
>> drivers/gpu/drm/display/drm_dp_cec.c | 37 ++-
>> drivers/gpu/drm/display/drm_dp_helper.c | 345 +++++++++++---------------
>> drivers/gpu/drm/display/drm_dp_mst_topology.c | 132 +++++-----
>> drivers/gpu/drm/display/drm_dp_tunnel.c | 20 +-
>> drivers/gpu/drm/msm/dp/dp_ctrl.c | 45 ++--
>> drivers/gpu/drm/msm/dp/dp_link.c | 17 +-
>> include/drm/display/drm_dp_helper.h | 81 +++++-
>> include/drm/display/drm_dp_mst_helper.h | 10 +-
>> 9 files changed, 354 insertions(+), 345 deletions(-)
>> ---
>> base-commit: 440aaf479c9aaf5ecea9a463eb826ec243d5f1cf
>> change-id: 20241231-drm-rework-dpcd-access-b0fc2e47d613
>>
>> Best regards,
>> --
>> Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-01-23 10:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 8:56 [PATCH RFC 0/7] drm/display: dp: add new DPCD access functions Dmitry Baryshkov
2025-01-17 8:56 ` [PATCH RFC 1/7] drm/display: dp: change drm_dp_dpcd_read_link_status() return Dmitry Baryshkov
2025-02-18 21:30 ` Lyude Paul
2025-01-17 8:56 ` [PATCH RFC 2/7] drm/display: dp: implement new access helpers Dmitry Baryshkov
2025-01-23 10:26 ` Jani Nikula
2025-01-23 11:04 ` Dmitry Baryshkov
2025-02-18 21:27 ` Lyude Paul
2025-01-17 8:56 ` [PATCH RFC 3/7] drm/display: dp: use new DCPD " Dmitry Baryshkov
2025-02-18 21:35 ` Lyude Paul
2025-01-17 8:56 ` [PATCH RFC 4/7] drm/display: dp-aux-dev: " Dmitry Baryshkov
2025-01-23 10:05 ` Jani Nikula
2025-01-23 11:05 ` Dmitry Baryshkov
2025-02-12 23:56 ` Ville Syrjälä
2025-02-13 0:07 ` Dmitry Baryshkov
2025-01-17 8:56 ` [PATCH RFC 5/7] drm/display: dp-cec: " Dmitry Baryshkov
2025-02-18 21:38 ` Lyude Paul
2025-01-17 8:56 ` [PATCH RFC 6/7] drm/display: dp-mst-topology: " Dmitry Baryshkov
2025-02-18 21:40 ` Lyude Paul
2025-01-17 8:56 ` [PATCH RFC 7/7] drm/display: dp-tunnel: " Dmitry Baryshkov
2025-02-18 21:43 ` Lyude Paul
2025-01-22 22:14 ` [PATCH RFC 0/7] drm/display: dp: add new DPCD access functions Dmitry Baryshkov
2025-01-23 10:12 ` Jani Nikula [this message]
2025-02-09 3:38 ` Dmitry Baryshkov
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=87r04tn8is.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).