dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Vincent Abriou <vincent.abriou@st.com>
Cc: Nicolas VANHAELEWYN <nicolas.vanhaelewyn@st.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Fabien Dessenne <fabien.dessenne@st.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/sti: enable fbdev compatibility through module param
Date: Fri, 30 Oct 2015 11:38:47 +0100	[thread overview]
Message-ID: <20151030103847.GX16848@phenom.ffwll.local> (raw)
In-Reply-To: <1446123749-7525-1-git-send-email-vincent.abriou@st.com>

On Thu, Oct 29, 2015 at 02:02:29PM +0100, Vincent Abriou wrote:
> DRM_STI_FBDEV is removed and replaced by the fbdev module param.
> By default, the fbdev compatibility is disabled.
> 
> Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
> Signed-off-by: Nicolas VANHAELEWYN <nicolas.vanhaelewyn@st.com>

Already replied somewhere else, but we have this in the core fb helpers
with drm_kms_helper.fbdev_emulation module option. Just make sure that one
works for sti.
-Daniel

> ---
>  drivers/gpu/drm/sti/Kconfig   |  6 ------
>  drivers/gpu/drm/sti/sti_drv.c | 15 ++++++++++-----
>  2 files changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig
> index 0a9048c..3f8d590 100644
> --- a/drivers/gpu/drm/sti/Kconfig
> +++ b/drivers/gpu/drm/sti/Kconfig
> @@ -10,9 +10,3 @@ config DRM_STI
>  	select FW_LOADER_USER_HELPER_FALLBACK
>  	help
>  	  Choose this option to enable DRM on STM stiH41x chipset
> -
> -config DRM_STI_FBDEV
> -	bool "DRM frame buffer device for STMicroelectronics SoC stiH41x Serie"
> -	depends on DRM_STI
> -	help
> -	  Choose this option to enable FBDEV on top of DRM for STM stiH41x chipset
> diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
> index e19c173..d47b025 100644
> --- a/drivers/gpu/drm/sti/sti_drv.c
> +++ b/drivers/gpu/drm/sti/sti_drv.c
> @@ -30,6 +30,11 @@
>  #define STI_MAX_FB_HEIGHT	4096
>  #define STI_MAX_FB_WIDTH	4096
>  
> +/* Module parameter to enable fbdev compatibility */
> +static bool fbdev_enabled;
> +MODULE_PARM_DESC(fbdev, "Enable fbdev compatibility layer");
> +module_param_named(fbdev, fbdev_enabled, bool, 0644);
> +
>  static void sti_atomic_schedule(struct sti_private *private,
>  				struct drm_atomic_state *state)
>  {
> @@ -160,11 +165,11 @@ static int sti_load(struct drm_device *dev, unsigned long flags)
>  
>  	drm_mode_config_reset(dev);
>  
> -#ifdef CONFIG_DRM_STI_FBDEV
> -	drm_fbdev_cma_init(dev, 32,
> -			   dev->mode_config.num_crtc,
> -			   dev->mode_config.num_connector);
> -#endif
> +	if (fbdev_enabled)
> +		drm_fbdev_cma_init(dev, 32,
> +				   dev->mode_config.num_crtc,
> +				   dev->mode_config.num_connector);
> +
>  	return 0;
>  }
>  
> -- 
> 1.9.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-10-30 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 13:02 [PATCH 1/1] drm/sti: enable fbdev compatibility through module param Vincent Abriou
2015-10-30 10:38 ` Daniel Vetter [this message]
2015-10-30 12:22   ` Vincent ABRIOU

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=20151030103847.GX16848@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=benjamin.gaignard@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabien.dessenne@st.com \
    --cc=nicolas.vanhaelewyn@st.com \
    --cc=vincent.abriou@st.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