From: Dave Airlie <airlied@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@linux.intel.com, Dave Airlie <airlied@redhat.com>,
Jani Nikula <jani.nikula@intel.com>
Subject: [Intel-gfx] [PATCH 11/25] drm/i915: split audio functions from display vtable
Date: Fri, 10 Sep 2021 13:17:27 +1000 [thread overview]
Message-ID: <20210910031741.3292388-12-airlied@gmail.com> (raw)
In-Reply-To: <20210910031741.3292388-1-airlied@gmail.com>
From: Dave Airlie <airlied@redhat.com>
These are only used internally in the audio code
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/i915/display/intel_audio.c | 24 +++++++++++-----------
drivers/gpu/drm/i915/i915_drv.h | 19 +++++++++++------
2 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
index 532237588511..f539826c0424 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -848,8 +848,8 @@ void intel_audio_codec_enable(struct intel_encoder *encoder,
connector->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2;
- if (dev_priv->display.audio_codec_enable)
- dev_priv->display.audio_codec_enable(encoder,
+ if (dev_priv->audio_funcs.audio_codec_enable)
+ dev_priv->audio_funcs.audio_codec_enable(encoder,
crtc_state,
conn_state);
@@ -893,8 +893,8 @@ void intel_audio_codec_disable(struct intel_encoder *encoder,
enum port port = encoder->port;
enum pipe pipe = crtc->pipe;
- if (dev_priv->display.audio_codec_disable)
- dev_priv->display.audio_codec_disable(encoder,
+ if (dev_priv->audio_funcs.audio_codec_disable)
+ dev_priv->audio_funcs.audio_codec_disable(encoder,
old_crtc_state,
old_conn_state);
@@ -922,17 +922,17 @@ void intel_audio_codec_disable(struct intel_encoder *encoder,
void intel_init_audio_hooks(struct drm_i915_private *dev_priv)
{
if (IS_G4X(dev_priv)) {
- dev_priv->display.audio_codec_enable = g4x_audio_codec_enable;
- dev_priv->display.audio_codec_disable = g4x_audio_codec_disable;
+ dev_priv->audio_funcs.audio_codec_enable = g4x_audio_codec_enable;
+ dev_priv->audio_funcs.audio_codec_disable = g4x_audio_codec_disable;
} else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
- dev_priv->display.audio_codec_enable = ilk_audio_codec_enable;
- dev_priv->display.audio_codec_disable = ilk_audio_codec_disable;
+ dev_priv->audio_funcs.audio_codec_enable = ilk_audio_codec_enable;
+ dev_priv->audio_funcs.audio_codec_disable = ilk_audio_codec_disable;
} else if (IS_HASWELL(dev_priv) || DISPLAY_VER(dev_priv) >= 8) {
- dev_priv->display.audio_codec_enable = hsw_audio_codec_enable;
- dev_priv->display.audio_codec_disable = hsw_audio_codec_disable;
+ dev_priv->audio_funcs.audio_codec_enable = hsw_audio_codec_enable;
+ dev_priv->audio_funcs.audio_codec_disable = hsw_audio_codec_disable;
} else if (HAS_PCH_SPLIT(dev_priv)) {
- dev_priv->display.audio_codec_enable = ilk_audio_codec_enable;
- dev_priv->display.audio_codec_disable = ilk_audio_codec_disable;
+ dev_priv->audio_funcs.audio_codec_enable = ilk_audio_codec_enable;
+ dev_priv->audio_funcs.audio_codec_disable = ilk_audio_codec_disable;
}
}
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 8930bf2db226..1ba94dee683e 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -364,6 +364,15 @@ struct intel_color_funcs {
void (*read_luts)(struct intel_crtc_state *crtc_state);
};
+struct intel_audio_funcs {
+ void (*audio_codec_enable)(struct intel_encoder *encoder,
+ const struct intel_crtc_state *crtc_state,
+ const struct drm_connector_state *conn_state);
+ void (*audio_codec_disable)(struct intel_encoder *encoder,
+ const struct intel_crtc_state *old_crtc_state,
+ const struct drm_connector_state *old_conn_state);
+};
+
struct drm_i915_display_funcs {
void (*get_cdclk)(struct drm_i915_private *dev_priv,
struct intel_cdclk_config *cdclk_config);
@@ -386,12 +395,7 @@ struct drm_i915_display_funcs {
struct intel_crtc *crtc);
void (*commit_modeset_enables)(struct intel_atomic_state *state);
void (*commit_modeset_disables)(struct intel_atomic_state *state);
- void (*audio_codec_enable)(struct intel_encoder *encoder,
- const struct intel_crtc_state *crtc_state,
- const struct drm_connector_state *conn_state);
- void (*audio_codec_disable)(struct intel_encoder *encoder,
- const struct intel_crtc_state *old_crtc_state,
- const struct drm_connector_state *old_conn_state);
+
void (*fdi_link_train)(struct intel_crtc *crtc,
const struct intel_crtc_state *crtc_state);
void (*hpd_irq_setup)(struct drm_i915_private *dev_priv);
@@ -977,6 +981,9 @@ struct drm_i915_private {
/* Display internal color functions */
struct intel_color_funcs color_funcs;
+ /* Display internal audio functions */
+ struct intel_audio_funcs audio_funcs;
+
/* PCH chipset type */
enum intel_pch pch_type;
unsigned short pch_id;
--
2.31.1
next prev parent reply other threads:[~2021-09-10 3:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 3:17 [Intel-gfx] i915/display: split and constify vtable (v4) Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 01/25] drm/i915/uncore: split the fw get function into separate vfunc Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 02/25] drm/i915/uncore: constify the register vtables Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 03/25] drm/i915/pm: drop get_fifo_size vfunc Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 04/25] drm/i915: make update_wm take a dev_priv Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 05/25] drm/i915/wm: provide wrappers around watermark vfuncs calls (v2) Dave Airlie
2021-09-14 17:23 ` Jani Nikula
2021-09-10 3:17 ` [Intel-gfx] [PATCH 06/25] drm/i915: add wrappers around cdclk vtable funcs Dave Airlie
2021-09-14 17:25 ` Jani Nikula
2021-09-10 3:17 ` [Intel-gfx] [PATCH 07/25] drm/i915/display: add intel_fdi_link_train wrapper Dave Airlie
2021-09-14 17:25 ` Jani Nikula
2021-09-10 3:17 ` [Intel-gfx] [PATCH 08/25] drm/i915: split clock gating init from display vtable Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 09/25] drm/i915: split watermark vfuncs " Dave Airlie
2021-09-14 18:20 ` Jani Nikula
2021-09-10 3:17 ` [Intel-gfx] [PATCH 10/25] drm/i915: split color functions " Dave Airlie
2021-09-10 3:17 ` Dave Airlie [this message]
2021-09-10 3:17 ` [Intel-gfx] [PATCH 12/25] drm/i915: split cdclk " Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 13/25] drm/i915: split irq hotplug function " Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 14/25] drm/i915: split fdi link training " Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 15/25] drm/i915: split the dpll clock compute out " Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 16/25] drm/i915: constify fdi link training vtable Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 17/25] drm/i915: constify hotplug function vtable Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 18/25] drm/i915: constify color " Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 19/25] drm/i915: constify the audio " Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 20/25] drm/i915: constify the dpll clock vtable Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 21/25] drm/i915: constify the cdclk vtable Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 22/25] drm/i915: drop unused function ptr and comments Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 23/25] drm/i915: constify display function vtable Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 24/25] drm/i915: constify clock gating init vtable Dave Airlie
2021-09-10 3:17 ` [Intel-gfx] [PATCH 25/25] drm/i915: constify display wm vtable Dave Airlie
2021-09-10 3:22 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [01/25] drm/i915/uncore: split the fw get function into separate vfunc 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=20210910031741.3292388-12-airlied@gmail.com \
--to=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--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