Message ID | 9a04d5af717f6fddcf21a3c096eb3807dffbc1cf.1634918767.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: split out audio private from dev_priv | expand |
On Fri, Oct 22, 2021 at 07:27:55PM +0300, Jani Nikula wrote: >With an anonymous struct, this can be pure hierarchical organization >without code changes. start reading from patch 1 left me confused. A sentence here that next patches will add the sub-struct name would be good. Lucas De Marchi > >Cc: Dave Airlie <airlied@redhat.com> >Signed-off-by: Jani Nikula <jani.nikula@intel.com> >--- > drivers/gpu/drm/i915/i915_drv.h | 43 +++++++++++++++++---------------- > 1 file changed, 22 insertions(+), 21 deletions(-) > >diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h >index 19e6700a4315..ee210e12648a 100644 >--- a/drivers/gpu/drm/i915/i915_drv.h >+++ b/drivers/gpu/drm/i915/i915_drv.h >@@ -995,9 +995,6 @@ struct drm_i915_private { > /* Display internal color functions */ > const struct intel_color_funcs *color_funcs; > >- /* Display internal audio functions */ >- const struct intel_audio_funcs *audio_funcs; >- > /* Display CDCLK functions */ > const struct intel_cdclk_funcs *cdclk_funcs; > >@@ -1084,17 +1081,6 @@ struct drm_i915_private { > struct drm_property *broadcast_rgb_property; > struct drm_property *force_audio_property; > >- /* hda/i915 audio component */ >- struct i915_audio_component *audio_component; >- bool audio_component_registered; >- /** >- * av_mutex - mutex for audio/video sync >- * >- */ >- struct mutex av_mutex; >- int audio_power_refcount; >- u32 audio_freq_cntrl; >- > u32 fdi_rx_config; > > /* Shadow for DISPLAY_PHY_CONTROL which can't be safely read */ >@@ -1227,14 +1213,29 @@ struct drm_i915_private { > > bool ipc_enabled; > >- /* Used to save the pipe-to-encoder mapping for audio */ >- struct intel_encoder *av_enc_map[I915_MAX_PIPES]; >- >- /* necessary resource sharing with HDMI LPE audio driver. */ > struct { >- struct platform_device *platdev; >- int irq; >- } lpe_audio; >+ /* Display internal audio functions */ >+ const struct intel_audio_funcs *audio_funcs; >+ >+ /* hda/i915 audio component */ >+ struct i915_audio_component *audio_component; >+ bool audio_component_registered; >+ /** >+ * av_mutex - mutex for audio/video sync >+ */ >+ struct mutex av_mutex; >+ int audio_power_refcount; >+ u32 audio_freq_cntrl; >+ >+ /* Used to save the pipe-to-encoder mapping for audio */ >+ struct intel_encoder *av_enc_map[I915_MAX_PIPES]; >+ >+ /* necessary resource sharing with HDMI LPE audio driver. */ >+ struct { >+ struct platform_device *platdev; >+ int irq; >+ } lpe_audio; >+ }; > > struct i915_pmu pmu; > >-- >2.30.2 >
On Fri, 22 Oct 2021, Lucas De Marchi <lucas.demarchi@intel.com> wrote: > On Fri, Oct 22, 2021 at 07:27:55PM +0300, Jani Nikula wrote: >>With an anonymous struct, this can be pure hierarchical organization >>without code changes. > > start reading from patch 1 left me confused. A sentence here that next > patches will add the sub-struct name would be good. Fixed in v2. > > Lucas De Marchi > >> >>Cc: Dave Airlie <airlied@redhat.com> >>Signed-off-by: Jani Nikula <jani.nikula@intel.com> >>--- >> drivers/gpu/drm/i915/i915_drv.h | 43 +++++++++++++++++---------------- >> 1 file changed, 22 insertions(+), 21 deletions(-) >> >>diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h >>index 19e6700a4315..ee210e12648a 100644 >>--- a/drivers/gpu/drm/i915/i915_drv.h >>+++ b/drivers/gpu/drm/i915/i915_drv.h >>@@ -995,9 +995,6 @@ struct drm_i915_private { >> /* Display internal color functions */ >> const struct intel_color_funcs *color_funcs; >> >>- /* Display internal audio functions */ >>- const struct intel_audio_funcs *audio_funcs; >>- >> /* Display CDCLK functions */ >> const struct intel_cdclk_funcs *cdclk_funcs; >> >>@@ -1084,17 +1081,6 @@ struct drm_i915_private { >> struct drm_property *broadcast_rgb_property; >> struct drm_property *force_audio_property; >> >>- /* hda/i915 audio component */ >>- struct i915_audio_component *audio_component; >>- bool audio_component_registered; >>- /** >>- * av_mutex - mutex for audio/video sync >>- * >>- */ >>- struct mutex av_mutex; >>- int audio_power_refcount; >>- u32 audio_freq_cntrl; >>- >> u32 fdi_rx_config; >> >> /* Shadow for DISPLAY_PHY_CONTROL which can't be safely read */ >>@@ -1227,14 +1213,29 @@ struct drm_i915_private { >> >> bool ipc_enabled; >> >>- /* Used to save the pipe-to-encoder mapping for audio */ >>- struct intel_encoder *av_enc_map[I915_MAX_PIPES]; >>- >>- /* necessary resource sharing with HDMI LPE audio driver. */ >> struct { >>- struct platform_device *platdev; >>- int irq; >>- } lpe_audio; >>+ /* Display internal audio functions */ >>+ const struct intel_audio_funcs *audio_funcs; >>+ >>+ /* hda/i915 audio component */ >>+ struct i915_audio_component *audio_component; >>+ bool audio_component_registered; >>+ /** >>+ * av_mutex - mutex for audio/video sync >>+ */ >>+ struct mutex av_mutex; >>+ int audio_power_refcount; >>+ u32 audio_freq_cntrl; >>+ >>+ /* Used to save the pipe-to-encoder mapping for audio */ >>+ struct intel_encoder *av_enc_map[I915_MAX_PIPES]; >>+ >>+ /* necessary resource sharing with HDMI LPE audio driver. */ >>+ struct { >>+ struct platform_device *platdev; >>+ int irq; >>+ } lpe_audio; >>+ }; >> >> struct i915_pmu pmu; >> >>-- >>2.30.2 >>
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 19e6700a4315..ee210e12648a 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -995,9 +995,6 @@ struct drm_i915_private { /* Display internal color functions */ const struct intel_color_funcs *color_funcs; - /* Display internal audio functions */ - const struct intel_audio_funcs *audio_funcs; - /* Display CDCLK functions */ const struct intel_cdclk_funcs *cdclk_funcs; @@ -1084,17 +1081,6 @@ struct drm_i915_private { struct drm_property *broadcast_rgb_property; struct drm_property *force_audio_property; - /* hda/i915 audio component */ - struct i915_audio_component *audio_component; - bool audio_component_registered; - /** - * av_mutex - mutex for audio/video sync - * - */ - struct mutex av_mutex; - int audio_power_refcount; - u32 audio_freq_cntrl; - u32 fdi_rx_config; /* Shadow for DISPLAY_PHY_CONTROL which can't be safely read */ @@ -1227,14 +1213,29 @@ struct drm_i915_private { bool ipc_enabled; - /* Used to save the pipe-to-encoder mapping for audio */ - struct intel_encoder *av_enc_map[I915_MAX_PIPES]; - - /* necessary resource sharing with HDMI LPE audio driver. */ struct { - struct platform_device *platdev; - int irq; - } lpe_audio; + /* Display internal audio functions */ + const struct intel_audio_funcs *audio_funcs; + + /* hda/i915 audio component */ + struct i915_audio_component *audio_component; + bool audio_component_registered; + /** + * av_mutex - mutex for audio/video sync + */ + struct mutex av_mutex; + int audio_power_refcount; + u32 audio_freq_cntrl; + + /* Used to save the pipe-to-encoder mapping for audio */ + struct intel_encoder *av_enc_map[I915_MAX_PIPES]; + + /* necessary resource sharing with HDMI LPE audio driver. */ + struct { + struct platform_device *platdev; + int irq; + } lpe_audio; + }; struct i915_pmu pmu;
With an anonymous struct, this can be pure hierarchical organization without code changes. Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/i915_drv.h | 43 +++++++++++++++++---------------- 1 file changed, 22 insertions(+), 21 deletions(-)