From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: airlied@gmail.com, daniel@ffwll.ch,
ville.syrjala@linux.intel.com, lucas.demarchi@intel.com,
jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 0/4] drm/i915: split out audio private from dev_priv
Date: Fri, 22 Oct 2021 19:27:54 +0300 [thread overview]
Message-ID: <cover.1634918767.git.jani.nikula@intel.com> (raw)
I'll first make the argument that drm_i915_private should not have a
single member that is not a named sub-struct defined separately. It's
just too big to have individual members like, say, framestart_delay. All
of these need context that is created using C constructs, not comments.
Ideas have been thrown around about splitting display data more, perhaps
to a separate "display private" struct. I'll also make the argument that
it is not fine-grained enough. Here, I'm taking the audio parts and
shoving them under intel_audio_private struct. It's still defined in
i915_drv.h, but it could be trivially turned into a completely opaque
type defined and allocated in intel_audio.c.
I think the driver is big enough to start requiring this kind of
abstractions, even at the cost of dynamic allocations and pointer
chasing that opaque types require. It's just too easy to poke at
drm_i915_private from wherever, breaking all abstractions.
Sure, it's no coincidence that I chose audio, it's fairly well isolated
already. Not all parts are going to be that easy. But I'm not sure I
like the thought of doing a massive display private struct refactoring
and not take one step further. Or, indeed, take this step *first*.
BR,
Jani.
Jani Nikula (4):
drm/i915/audio: group audio under anonymous struct in drm_i915_private
drm/i915/audio: name the audio sub-struct in drm_i915_private
drm/i915/audio: define the audio struct separately from
drm_i915_private
drm/i915/audio: move intel_audio_funcs internal to intel_audio.c
drivers/gpu/drm/i915/display/intel_audio.c | 99 ++++++++++---------
.../gpu/drm/i915/display/intel_lpe_audio.c | 42 ++++----
drivers/gpu/drm/i915/i915_drv.c | 2 +-
drivers/gpu/drm/i915/i915_drv.h | 56 +++++------
4 files changed, 101 insertions(+), 98 deletions(-)
--
2.30.2
next reply other threads:[~2021-10-22 16:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 16:27 Jani Nikula [this message]
2021-10-22 16:27 ` [Intel-gfx] [PATCH 1/4] drm/i915/audio: group audio under anonymous struct in drm_i915_private Jani Nikula
2021-10-22 17:22 ` Lucas De Marchi
2021-10-28 17:36 ` Jani Nikula
2021-10-22 16:27 ` [Intel-gfx] [PATCH 2/4] drm/i915/audio: name the audio sub-struct " Jani Nikula
2021-10-22 16:42 ` Ville Syrjälä
2021-10-22 16:58 ` Jani Nikula
2021-10-22 16:27 ` [Intel-gfx] [PATCH 3/4] drm/i915/audio: define the audio struct separately from drm_i915_private Jani Nikula
2021-10-22 16:44 ` Ville Syrjälä
2021-10-22 17:07 ` Jani Nikula
2021-10-28 17:37 ` Jani Nikula
2021-10-22 16:27 ` [Intel-gfx] [PATCH 4/4] drm/i915/audio: move intel_audio_funcs internal to intel_audio.c Jani Nikula
2021-10-22 16:48 ` Ville Syrjälä
2021-10-22 17:29 ` [Intel-gfx] [PATCH 0/4] drm/i915: split out audio private from dev_priv Lucas De Marchi
2021-10-22 20:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-10-22 21:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-23 4:33 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=cover.1634918767.git.jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=ville.syrjala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.