Re: [PATCH 14/39] drm/i915: move and group fbdev under display.fbdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Jani
> Nikula
> Sent: Thursday, August 11, 2022 8:37 PM
> To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Nikula, Jani <jani.nikula@xxxxxxxxx>; De Marchi, Lucas
> <lucas.demarchi@xxxxxxxxx>
> Subject:  [PATCH 14/39] drm/i915: move and group fbdev under
> display.fbdev
> 
> Move display related members under drm_i915_private display sub-struct.
> 
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
Reviewed-by:  Arun R Murthy <arun.r.murthy@xxxxxxxxx>

Thanks and Regards,
Arun R Murthy
--------------------

> ---
>  .../gpu/drm/i915/display/intel_display_core.h |  8 ++++++
> .../drm/i915/display/intel_display_debugfs.c  |  2 +-
>  drivers/gpu/drm/i915/display/intel_fbdev.c    | 26 +++++++++----------
>  drivers/gpu/drm/i915/i915_drv.h               |  5 ----
>  4 files changed, 22 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h
> b/drivers/gpu/drm/i915/display/intel_display_core.h
> index f12ff36fef07..71434a922695 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> @@ -9,6 +9,7 @@
>  #include <linux/mutex.h>
>  #include <linux/types.h>
>  #include <linux/wait.h>
> +#include <linux/workqueue.h>
> 
>  #include "intel_display.h"
>  #include "intel_dmc.h"
> @@ -26,6 +27,7 @@ struct intel_crtc;
>  struct intel_crtc_state;
>  struct intel_dpll_funcs;
>  struct intel_dpll_mgr;
> +struct intel_fbdev;
>  struct intel_fdi_funcs;
>  struct intel_hotplug_funcs;
>  struct intel_initial_plane_config;
> @@ -130,6 +132,12 @@ struct intel_display {
>  	} funcs;
> 
>  	/* Grouping using anonymous structs. Keep sorted. */
> +	struct {
> +		/* list of fbdev register on this device */
> +		struct intel_fbdev *fbdev;
> +		struct work_struct suspend_work;
> +	} fbdev;
> +
>  	struct {
>  		/*
>  		 * Base address of where the gmbus and gpio blocks are
> located diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 7994f78b889a..e568590faa82 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -129,7 +129,7 @@ static int i915_gem_framebuffer_info(struct seq_file
> *m, void *data)
>  	struct drm_framebuffer *drm_fb;
> 
>  #ifdef CONFIG_DRM_FBDEV_EMULATION
> -	fbdev_fb = intel_fbdev_framebuffer(dev_priv->fbdev);
> +	fbdev_fb = intel_fbdev_framebuffer(dev_priv->display.fbdev.fbdev);
>  	if (fbdev_fb) {
>  		seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp,
> modifier 0x%llx, refcount %d, obj ",
>  			   fbdev_fb->base.width,
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c
> b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 221336178991..c08ff6a5c2e9 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -500,7 +500,7 @@ static void intel_fbdev_suspend_worker(struct
> work_struct *work)  {
>  	intel_fbdev_set_suspend(&container_of(work,
>  					      struct drm_i915_private,
> -					      fbdev_suspend_work)->drm,
> +					      display.fbdev.suspend_work)-
> >drm,
>  				FBINFO_STATE_RUNNING,
>  				true);
>  }
> @@ -530,8 +530,8 @@ int intel_fbdev_init(struct drm_device *dev)
>  		return ret;
>  	}
> 
> -	dev_priv->fbdev = ifbdev;
> -	INIT_WORK(&dev_priv->fbdev_suspend_work,
> intel_fbdev_suspend_worker);
> +	dev_priv->display.fbdev.fbdev = ifbdev;
> +	INIT_WORK(&dev_priv->display.fbdev.suspend_work,
> +intel_fbdev_suspend_worker);
> 
>  	return 0;
>  }
> @@ -548,7 +548,7 @@ static void intel_fbdev_initial_config(void *data,
> async_cookie_t cookie)
> 
>  void intel_fbdev_initial_config_async(struct drm_device *dev)  {
> -	struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;
> +	struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
> 
>  	if (!ifbdev)
>  		return;
> @@ -568,12 +568,12 @@ static void intel_fbdev_sync(struct intel_fbdev
> *ifbdev)
> 
>  void intel_fbdev_unregister(struct drm_i915_private *dev_priv)  {
> -	struct intel_fbdev *ifbdev = dev_priv->fbdev;
> +	struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
> 
>  	if (!ifbdev)
>  		return;
> 
> -	cancel_work_sync(&dev_priv->fbdev_suspend_work);
> +	cancel_work_sync(&dev_priv->display.fbdev.suspend_work);
>  	if (!current_is_async())
>  		intel_fbdev_sync(ifbdev);
> 
> @@ -582,7 +582,7 @@ void intel_fbdev_unregister(struct drm_i915_private
> *dev_priv)
> 
>  void intel_fbdev_fini(struct drm_i915_private *dev_priv)  {
> -	struct intel_fbdev *ifbdev = fetch_and_zero(&dev_priv->fbdev);
> +	struct intel_fbdev *ifbdev =
> +fetch_and_zero(&dev_priv->display.fbdev.fbdev);
> 
>  	if (!ifbdev)
>  		return;
> @@ -596,7 +596,7 @@ void intel_fbdev_fini(struct drm_i915_private
> *dev_priv)
>   */
>  static void intel_fbdev_hpd_set_suspend(struct drm_i915_private *i915, int
> state)  {
> -	struct intel_fbdev *ifbdev = i915->fbdev;
> +	struct intel_fbdev *ifbdev = i915->display.fbdev.fbdev;
>  	bool send_hpd = false;
> 
>  	mutex_lock(&ifbdev->hpd_lock);
> @@ -614,7 +614,7 @@ static void intel_fbdev_hpd_set_suspend(struct
> drm_i915_private *i915, int state  void intel_fbdev_set_suspend(struct
> drm_device *dev, int state, bool synchronous)  {
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> -	struct intel_fbdev *ifbdev = dev_priv->fbdev;
> +	struct intel_fbdev *ifbdev = dev_priv->display.fbdev.fbdev;
>  	struct fb_info *info;
> 
>  	if (!ifbdev || !ifbdev->vma)
> @@ -631,7 +631,7 @@ void intel_fbdev_set_suspend(struct drm_device
> *dev, int state, bool synchronous
>  		 * ourselves, so only flush outstanding work upon suspend!
>  		 */
>  		if (state != FBINFO_STATE_RUNNING)
> -			flush_work(&dev_priv->fbdev_suspend_work);
> +			flush_work(&dev_priv-
> >display.fbdev.suspend_work);
> 
>  		console_lock();
>  	} else {
> @@ -645,7 +645,7 @@ void intel_fbdev_set_suspend(struct drm_device
> *dev, int state, bool synchronous
>  			/* Don't block our own workqueue as this can
>  			 * be run in parallel with other i915.ko tasks.
>  			 */
> -			schedule_work(&dev_priv->fbdev_suspend_work);
> +			schedule_work(&dev_priv-
> >display.fbdev.suspend_work);
>  			return;
>  		}
>  	}
> @@ -666,7 +666,7 @@ void intel_fbdev_set_suspend(struct drm_device
> *dev, int state, bool synchronous
> 
>  void intel_fbdev_output_poll_changed(struct drm_device *dev)  {
> -	struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;
> +	struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
>  	bool send_hpd;
> 
>  	if (!ifbdev)
> @@ -685,7 +685,7 @@ void intel_fbdev_output_poll_changed(struct
> drm_device *dev)
> 
>  void intel_fbdev_restore_mode(struct drm_device *dev)  {
> -	struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;
> +	struct intel_fbdev *ifbdev = to_i915(dev)->display.fbdev.fbdev;
> 
>  	if (!ifbdev)
>  		return;
> diff --git a/drivers/gpu/drm/i915/i915_drv.h
> b/drivers/gpu/drm/i915/i915_drv.h index 482a8c0d5a10..f1e47090c01e
> 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -82,7 +82,6 @@ struct intel_cdclk_vals;  struct intel_connector;  struct
> intel_dp;  struct intel_encoder; -struct intel_fbdev;  struct intel_limit;  struct
> intel_overlay;  struct intel_overlay_error_state; @@ -474,10 +473,6 @@
> struct drm_i915_private {
> 
>  	struct i915_gpu_error gpu_error;
> 
> -	/* list of fbdev register on this device */
> -	struct intel_fbdev *fbdev;
> -	struct work_struct fbdev_suspend_work;
> -
>  	struct drm_property *broadcast_rgb_property;
>  	struct drm_property *force_audio_property;
> 
> --
> 2.34.1





[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux