dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Zack Rusin <zackr@vmware.com>
Cc: Marek Vasut <marex@denx.de>, Sascha Hauer <kernel@pengutronix.de>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Dave Airlie <airlied@linux.ie>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Roland Scheidegger <sroland@vmware.com>,
	VMware Graphics <linux-graphics-maintainer@vmware.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 1/4] drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION
Date: Thu, 15 Apr 2021 20:49:32 +0200	[thread overview]
Message-ID: <CAKMK7uGVuw_ViUL3do=VD6o1Xj-6Wd3a4uuF=yTc5oDhtu77Jg@mail.gmail.com> (raw)
In-Reply-To: <af143092-edd3-91eb-025d-836de1e4a104@vmware.com>

On Thu, Apr 15, 2021 at 8:21 PM Zack Rusin <zackr@vmware.com> wrote:
>
> On 4/15/21 7:00 AM, Thomas Zimmermann wrote:
> > Respect DRM's kconfig setting for fbdev console emulation. If enabled,
> > it will select all required config options. So remove them from vmwgfx's
> > Kconfig file.
> >
> > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> > ---
> >   drivers/gpu/drm/vmwgfx/Kconfig      |  7 +------
> >   drivers/gpu/drm/vmwgfx/Makefile     |  4 +++-
> >   drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 19 +++++++++++++++++++
> >   3 files changed, 23 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/vmwgfx/Kconfig b/drivers/gpu/drm/vmwgfx/Kconfig
> > index 15acdf2a7c0f..b3a34196935b 100644
> > --- a/drivers/gpu/drm/vmwgfx/Kconfig
> > +++ b/drivers/gpu/drm/vmwgfx/Kconfig
> > @@ -2,12 +2,7 @@
> >   config DRM_VMWGFX
> >       tristate "DRM driver for VMware Virtual GPU"
> >       depends on DRM && PCI && X86 && MMU
> > -     select FB_DEFERRED_IO
> > -     select FB_CFB_FILLRECT
> > -     select FB_CFB_COPYAREA
> > -     select FB_CFB_IMAGEBLIT
> >       select DRM_TTM
> > -     select FB
> >       select MAPPING_DIRTY_HELPERS
> >       # Only needed for the transitional use of drm_crtc_init - can be removed
> >       # again once vmwgfx sets up the primary plane itself.
> > @@ -20,7 +15,7 @@ config DRM_VMWGFX
> >         The compiled module will be called "vmwgfx.ko".
> >
> >   config DRM_VMWGFX_FBCON
> > -     depends on DRM_VMWGFX && FB
> > +     depends on DRM_VMWGFX && DRM_FBDEV_EMULATION
> >       bool "Enable framebuffer console under vmwgfx by default"
> >       help
> >          Choose this option if you are shipping a new vmwgfx
> > diff --git a/drivers/gpu/drm/vmwgfx/Makefile b/drivers/gpu/drm/vmwgfx/Makefile
> > index 8c02fa5852e7..9f5743013cbb 100644
> > --- a/drivers/gpu/drm/vmwgfx/Makefile
> > +++ b/drivers/gpu/drm/vmwgfx/Makefile
> > @@ -1,6 +1,6 @@
> >   # SPDX-License-Identifier: GPL-2.0
> >   vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \
> > -         vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \
> > +         vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_ttm_buffer.o \
> >           vmwgfx_cmd.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \
> >           vmwgfx_overlay.o vmwgfx_gmrid_manager.o vmwgfx_fence.o \
> >           vmwgfx_bo.o vmwgfx_scrn.o vmwgfx_context.o \
> > @@ -11,5 +11,7 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \
> >           vmwgfx_validation.o vmwgfx_page_dirty.o vmwgfx_streamoutput.o \
> >           ttm_object.o ttm_lock.o ttm_memory.o
> >
> > +vmwgfx-$(CONFIG_DRM_FBDEV_EMULATION) += vmwgfx_fb.o
> >   vmwgfx-$(CONFIG_TRANSPARENT_HUGEPAGE) += vmwgfx_thp.o
> > +
> >   obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o
> > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> > index 7e6518709e14..e7836da190c4 100644
> > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> > @@ -1116,10 +1116,29 @@ extern void vmw_generic_waiter_remove(struct vmw_private *dev_priv,
> >    * Kernel framebuffer - vmwgfx_fb.c
> >    */
> >
> > +#ifdef CONFIG_DRM_FBDEV_EMULATION
> >   int vmw_fb_init(struct vmw_private *vmw_priv);
> >   int vmw_fb_close(struct vmw_private *dev_priv);
> >   int vmw_fb_off(struct vmw_private *vmw_priv);
> >   int vmw_fb_on(struct vmw_private *vmw_priv);
> > +#else
> > +static inline int vmw_fb_init(struct vmw_private *vmw_priv)
> > +{
> > +     return 0;
> > +}
> > +static inline int vmw_fb_close(struct vmw_private *dev_priv)
> > +{
> > +     return 0;
> > +}
> > +static inline int vmw_fb_off(struct vmw_private *vmw_priv)
> > +{
> > +     return 0;
> > +}
> > +static inline int vmw_fb_on(struct vmw_private *vmw_priv)
> > +{
> > +     return 0;
> > +}
> > +#endif
> >
> >   /**
> >    * Kernel modesetting - vmwgfx_kms.c
> >
>
> This changes the behavior a bit, I guess DRM_VMWGFX (or at least DRM_VMWGFX_FBCON) would need to select DRM_FBDEV_EMULATION to preserve the old behavior, but that's largely due to the fact that given how those options were setup we never run without FB set. In general it should be ok and looks more reasonable than the current setup. I'll try it out on Monday just in case, but for now:

The issue is that select in Kconfig is pretty annoying (hard to
disable, and it's not recursive), so there's a bit a push to retire
it. Especially for user-facing config knobs like whether you want
fbdev emulation or not. Hence the change.
-Daniel

> Reviewed-by: Zack Rusin <zackr@vmware.com>
>
> z



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

  reply	other threads:[~2021-04-15 18:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-15 11:00 [PATCH 0/4] drm: Fix config dependencies for fbdev emulation Thomas Zimmermann
2021-04-15 11:00 ` [PATCH 1/4] drm/vmwgfx: Make console emulation depend on DRM_FBDEV_EMULATION Thomas Zimmermann
2021-04-15 18:21   ` Zack Rusin
2021-04-15 18:49     ` Daniel Vetter [this message]
2021-04-15 19:14       ` Zack Rusin
2021-04-15 18:50     ` Thomas Zimmermann
2021-04-16 10:48       ` Thomas Zimmermann
2021-04-15 11:00 ` [PATCH 2/4] drm/mxsfb: Don't select DRM_KMS_FB_HELPER Thomas Zimmermann
2021-04-15 15:03   ` Stefan Agner
2021-04-15 11:00 ` [PATCH 3/4] drm/zte: " Thomas Zimmermann
2021-04-15 11:00 ` [PATCH 4/4] drm: Remove DRM_KMS_FB_HELPER Kconfig option Thomas Zimmermann
2021-04-15 15:39   ` Daniel Vetter
2021-05-25  9:28   ` Geert Uytterhoeven

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='CAKMK7uGVuw_ViUL3do=VD6o1Xj-6Wd3a4uuF=yTc5oDhtu77Jg@mail.gmail.com' \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=linux-imx@nxp.com \
    --cc=marex@denx.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=sroland@vmware.com \
    --cc=tzimmermann@suse.de \
    --cc=zackr@vmware.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;
as well as URLs for NNTP newsgroup(s).