From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>
Cc: "Manna, Animesh" <animesh.manna@intel.com>
Subject: Re: [PATCH v3 1/2] drm/i915/alpm: Make intel_alpm_enable_sink available for PSR
Date: Fri, 9 May 2025 12:04:15 +0000 [thread overview]
Message-ID: <8609941e8cc1882e626708a8df82240a35b49088.camel@intel.com> (raw)
In-Reply-To: <87tt5ujc8z.fsf@intel.com>
On Fri, 2025-05-09 at 13:43 +0300, Jani Nikula wrote:
> On Thu, 08 May 2025, Jouni Högander <jouni.hogander@intel.com> wrote:
> > We want to enable sink ALPM from PSR code. Make
> > intel_alpm_enable_sink
> > available for PSR.
> >
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_alpm.c | 11 +++++++++--
> > drivers/gpu/drm/i915/display/intel_alpm.h | 2 ++
> > 2 files changed, 11 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> > b/drivers/gpu/drm/i915/display/intel_alpm.c
> > index 1bf08b80c23f..9442483058d2 100644
> > --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> > +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> > @@ -426,8 +426,15 @@ void intel_alpm_pre_plane_update(struct
> > intel_atomic_state *state,
> > }
> > }
> >
> > -static void intel_alpm_enable_sink(struct intel_dp *intel_dp,
> > - const struct intel_crtc_state
> > *crtc_state)
> > +/**
> > + * intel_alpm_enable_sink - Enable ALPM on sink
> > + * @intel_dp: Intel DP struct
> > + * @crtc_state: Intel CRTC struct
> > + *
> > + * This function is enabling DPCD on sink based on information
> > from crtc_state.
> > + */
>
> Perhaps surprisingly I'm not a big fan of kernel-doc for all the
> simple
> little functions like this.
>
> The function name already says what it does, the parameters are
> self-explanatory.
>
> The kernel-doc is not even pulled into the Sphinx build... and why
> would
> it be, nobody reading the kernel documentation would be interested in
> this small detail.
>
> I might add a small regular comment about writing DPCD as needed...
> but
> might not.
>
> The documentation comments we absolutely need more are the high level
> descriptions at the top of files, which is a glaring omission in
> intel_alpm.c (and many other places). What is ALPM, what does it do,
> how, why, etc.
>
> See commit b031ef5ea8b1 ("drm/i915/mst: add beginnings of DP MST
> documentation") or intel_dp_mst.c for the kind of comments I'd love
> to
> have more.
>
> I'm not insisting you do that now, but perhaps consider dropping the
> kernel-doc.
Ok, I will drop it. For some reason I had an idea that these
"interface" functions should have docs. I've been just blindly
following that idea.
BR,
Jouni Högander
>
>
> BR,
> Jani.
>
>
> > +void intel_alpm_enable_sink(struct intel_dp *intel_dp,
> > + const struct intel_crtc_state
> > *crtc_state)
> > {
> > u8 val;
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h
> > b/drivers/gpu/drm/i915/display/intel_alpm.h
> > index d7126d65b60f..c9fe21e3e72c 100644
> > --- a/drivers/gpu/drm/i915/display/intel_alpm.h
> > +++ b/drivers/gpu/drm/i915/display/intel_alpm.h
> > @@ -23,6 +23,8 @@ void intel_alpm_lobf_compute_config(struct
> > intel_dp *intel_dp,
> > struct drm_connector_state
> > *conn_state);
> > void intel_alpm_configure(struct intel_dp *intel_dp,
> > const struct intel_crtc_state
> > *crtc_state);
> > +void intel_alpm_enable_sink(struct intel_dp *intel_dp,
> > + const struct intel_crtc_state
> > *crtc_state);
> > void intel_alpm_pre_plane_update(struct intel_atomic_state *state,
> > struct intel_crtc *crtc);
> > void intel_alpm_post_plane_update(struct intel_atomic_state
> > *state,
>
next prev parent reply other threads:[~2025-05-09 12:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-08 14:16 [PATCH v3 0/2] ALPM rework and fixes Jouni Högander
2025-05-08 14:17 ` [PATCH v3 1/2] drm/i915/alpm: Make intel_alpm_enable_sink available for PSR Jouni Högander
2025-05-09 4:25 ` Kandpal, Suraj
2025-05-09 10:43 ` Jani Nikula
2025-05-09 12:04 ` Hogander, Jouni [this message]
2025-05-08 14:17 ` [PATCH v3 2/2] drm/i915/alpm: Stop writing ALPM registers when PSR is enabled Jouni Högander
2025-05-13 3:59 ` Kandpal, Suraj
2025-05-13 4:46 ` Hogander, Jouni
2025-05-08 14:22 ` ✓ CI.Patch_applied: success for ALPM rework and fixes (rev3) Patchwork
2025-05-08 14:22 ` ✓ CI.checkpatch: " Patchwork
2025-05-08 14:23 ` ✓ CI.KUnit: " Patchwork
2025-05-08 14:32 ` ✓ CI.Build: " Patchwork
2025-05-08 14:34 ` ✓ CI.Hooks: " Patchwork
2025-05-08 14:35 ` ✗ CI.checksparse: warning " Patchwork
2025-05-08 15:11 ` ✓ Xe.CI.BAT: success " Patchwork
2025-05-09 5:54 ` ✗ Xe.CI.Full: failure " Patchwork
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=8609941e8cc1882e626708a8df82240a35b49088.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=animesh.manna@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
/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