Re: [Spice-devel] [PATCH v2 1/2] drm: Add a drm_drv_enabled() to check if drivers should be enabled

2021-11-05 Thread Sam Ravnborg
Hi Javier, On Thu, Nov 04, 2021 at 05:07:06PM +0100, Javier Martinez Canillas wrote: > Some DRM drivers check the vgacon_text_force() function return value as an > indication on whether they should be allowed to be enabled or not. > > This function returns true if the nomodeset kernel command lin

Re: [Spice-devel] [PATCH v2 1/2] drm: Add a drm_drv_enabled() to check if drivers should be enabled

2021-11-05 Thread Sam Ravnborg
Hi Javier, > > >>> > >>> - if (vgacon_text_force() && i915_modparams.modeset == -1) > >>> + ret = drm_drv_enabled(&driver); > >> > >> You pass the local driver variable here - which looks wrong as this is > >> not the same as the driver variable declared in another file. > > > > Yes, Jani ment

Re: [Spice-devel] [PATCH] drm/qxl: Convert to Linux IRQ interfaces

2021-07-09 Thread Sam Ravnborg
Looks correct, Acked-by: Sam Ravnborg Sam ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH 00/15] drm: Move struct drm_device.pdev to legacy

2020-11-25 Thread Sam Ravnborg
ce.pdev > drm: Upcast struct drm_device.dev to struct pci_device; replace pdev All above are: Acked-by: Sam Ravnborg > drm/nouveau: Remove references to struct drm_device.pdev I lost my confidence in my reading of this code. > drm/i915: Remove references to struct drm_device.pde

Re: [Spice-devel] [PATCH 05/15] drm/gma500: Remove references to struct drm_device.pdev

2020-11-25 Thread Sam Ravnborg
Hi Thomas. On Tue, Nov 24, 2020 at 12:38:14PM +0100, Thomas Zimmermann wrote: > Using struct drm_device.pdev is deprecated. Convert gma500 to struct > drm_device.dev. No functional changes. > > Signed-off-by: Thomas Zimmermann > Cc: Patrik Jakobsson This patch includes several whitespace chang

Re: [Spice-devel] [PATCH 09/15] drm/nouveau: Remove references to struct drm_device.pdev

2020-11-25 Thread Sam Ravnborg
Hi Thomas. On Tue, Nov 24, 2020 at 12:38:18PM +0100, Thomas Zimmermann wrote: > Using struct drm_device.pdev is deprecated. Convert nouveau to struct > drm_device.dev. No functional changes. > > Signed-off-by: Thomas Zimmermann > Cc: Ben Skeggs Suggestion to an alternative implmentation below.

Re: [Spice-devel] [PATCH 15/15] drm: Upcast struct drm_device.dev to struct pci_device; replace pdev

2020-11-25 Thread Sam Ravnborg
Hi Thomas, On Tue, Nov 24, 2020 at 12:38:24PM +0100, Thomas Zimmermann wrote: > We have DRM drivers based on USB, SPI and platform devices. All of them > are fine with storing their device reference in struct drm_device.dev. > PCI devices should be no exception. Therefore struct drm_device.pdev is

Re: [Spice-devel] [PATCH] drm: remove unneeded break

2020-11-09 Thread Sam Ravnborg
Hi Tom On Mon, Oct 19, 2020 at 07:06:41PM +0200, Sam Ravnborg wrote: > Hi Tom > On Mon, Oct 19, 2020 at 09:31:15AM -0700, t...@redhat.com wrote: > > From: Tom Rix > > > > A break is not needed if it is preceded by a return or break > > > > Signed-off-by: Tom

Re: [Spice-devel] [PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-25 Thread Sam Ravnborg
patch removes the rsp > code from both, bochs and fbdev. > > v5: > * implement fb_read/fb_write internally (Daniel, Sam) > v4: > * move dma_buf_map changes into separate patch (Daniel) > * TODO list: comment on fbdev updates (Daniel) > > Signed-off-by: T

Re: [Spice-devel] [PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-19 Thread Sam Ravnborg
On Fri, Oct 16, 2020 at 02:19:42PM +0200, Thomas Zimmermann wrote: > Hi > > On Fri, 16 Oct 2020 14:03:47 +0200 Sam Ravnborg wrote: > > > Hi Thomas. > > > > On Thu, Oct 15, 2020 at 02:38:06PM +0200, Thomas Zimmermann wrote: > > > At least sparc64 requi

Re: [Spice-devel] [PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-16 Thread Sam Ravnborg
I consider it fixed for real now and not just a workaround. I also tested with: qemu-system-sparc64 -m 512 -kernel vmlinux -append console=ttyS0 -serial stdio and it worked in both cases too. All the comments above so future-me have an easier time finding how to reproduce. Tested-by: Sam Ravn

Re: [Spice-devel] [PATCH v4 09/10] dma-buf-map: Add memcpy and pointer-increment interfaces

2020-10-16 Thread Sam Ravnborg
Hi Thomas. On Thu, Oct 15, 2020 at 02:38:05PM +0200, Thomas Zimmermann wrote: > To do framebuffer updates, one needs memcpy from system memory and a > pointer-increment function. Add both interfaces with documentation. > > Signed-off-by: Thomas Zimmermann > --- > include/linux/dma-buf-map.h | 7

Re: [Spice-devel] [PATCH v4 09/10] dma-buf-map: Add memcpy and pointer-increment interfaces

2020-10-16 Thread Sam Ravnborg
Hi Thomas. On Thu, Oct 15, 2020 at 02:38:05PM +0200, Thomas Zimmermann wrote: > To do framebuffer updates, one needs memcpy from system memory and a > pointer-increment function. Add both interfaces with documentation. > > Signed-off-by: Thomas Zimmermann Looks good. Reviewed-by:

Re: [Spice-devel] [PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-16 Thread Sam Ravnborg
* move dma_buf_map changes into separate patch (Daniel) > * TODO list: comment on fbdev updates (Daniel) I have been offline for a while so have not followed all the threads on this. So may comments below may well be addressed but I failed to see it. If the point about fb_sync is already ad

Re: [Spice-devel] [PATCH] drm/qxl: Fix build errors

2020-08-17 Thread Sam Ravnborg
l: Replace deprecated function in qxl_display") We should not use Fixes for local fixes like this, as we do not want the robots to pick this commit. With the Fixes: dropped (maybe just reference the commit in the changelog): Acked-by: Sam Ravnborg > Cc: Sidong Yang > Cc: Gerd Ho

Re: [Spice-devel] [PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc

2020-04-28 Thread Sam Ravnborg
On Tue, Apr 28, 2020 at 04:00:11PM +0200, Daniel Vetter wrote: > On Fri, Apr 24, 2020 at 05:09:11PM +0200, Sam Ravnborg wrote: > > Hi Daniel > > > > On Wed, Apr 15, 2020 at 09:40:01AM +0200, Daniel Vetter wrote: > > > Also need to remove the drm_dev_put from the remo

Re: [Spice-devel] [PATCH 27/59] drm/qxl: Don't use drm_device->dev_private

2020-04-24 Thread Sam Ravnborg
nn > Cc: virtualizat...@lists.linux-foundation.org > Cc: spice-devel@lists.freedesktop.org Acked-by: Sam Ravnborg > --- > drivers/gpu/drm/qxl/qxl_debugfs.c | 7 +++ > drivers/gpu/drm/qxl/qxl_display.c | 32 +++ > drivers/gpu/drm/qxl/qxl_drv.c | 8 ++

Re: [Spice-devel] [PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc

2020-04-24 Thread Sam Ravnborg
if (IS_ERR(qdev)) { > + pr_err("Unable to init drm dev"); > return -ENOMEM; > + } The other patches do not add any error message when devm_drm_dev_alloc() fails and driver core will log that driver init failed. So the pr_err() above should be drop

Re: [Spice-devel] [PATCH v4 0/4] drm: Provide a simple encoder

2020-02-29 Thread Sam Ravnborg
Hi Thomas. On Fri, Feb 28, 2020 at 09:18:24AM +0100, Thomas Zimmermann wrote: > Many DRM drivers implement an encoder with an empty implementation. This > patchset adds drm_simple_encoder_init(), which drivers can use instead. > Except for the destroy callback, the simple encoder's implementation

Re: [Spice-devel] [PATCH v3 3/4] drm/mgag200: Use simple encoder

2020-02-28 Thread Sam Ravnborg
DRM_ERROR("drm_simple_encoder_init() failed, error %d\n", > + -ret); DRM_ERROR is deprecated if you have a drm_device. Consider to use: drm_err(mdev->dev, "drm_simple_encoder_init() failed, error %d\n", ret); Note - "-ret" looked strange. We usually do not modify return values like this when printing. > + return ret; > } > + encoder->possible_crtcs = 0x1; > > connector = mga_vga_init(mdev->dev); > if (!connector) { With the above addressed: Reviewed-by: Sam Ravnborg Sam ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel

Re: [Spice-devel] [PATCH v3 4/4] drm/qxl: Use simple encoder

2020-02-28 Thread Sam Ravnborg
by: Thomas Zimmermann > Acked-by: Sam Ravnborg > Acked-by: Gerd Hoffmann > --- > drivers/gpu/drm/qxl/qxl_display.c | 18 +++--- > 1 file changed, 3 insertions(+), 15 deletions(-) > > diff --git a/drivers/gpu/drm/qxl/qxl_display.c > b/drivers/gpu/drm/qxl/qxl_displa

Re: [Spice-devel] [PATCH v3 1/4] drm/simple-kms: Add drm_simple_encoder_{init, create}()

2020-02-28 Thread Sam Ravnborg
et > * provide more precise documentation > v2: > * move simple encoder to KMS helpers > * remove name argument; simplifies implementation > * don't allocate with devm_ interfaces; unsafe with DRM > > Signed-off-by: Thomas Zimmermann Reviewed-by: Sam

Re: [Spice-devel] [PATCH v2 3/4] drm/mgag200: Use simple encoder

2020-02-21 Thread Sam Ravnborg
Hi Thomas. On Fri, Feb 21, 2020 at 08:48:48AM +0100, Thomas Zimmermann wrote: > Hi Sam > > thanks for reviewing the patch set. > > Am 20.02.20 um 19:56 schrieb Sam Ravnborg: > > Hi Thomas. > > > > On Tue, Feb 18, 2020 at 09:48:14AM +0100, Thomas Zimmermann wr

Re: [Spice-devel] [PATCH v2 4/4] drm/qxl: Use simple encoder

2020-02-20 Thread Sam Ravnborg
Thomas Zimmermann I looked at best_encoder - but could not see we could do anything. So from browsing the code: Acked-by: Sam Ravnborg Sam > --- > drivers/gpu/drm/qxl/qxl_display.c | 18 +++--- > 1 file changed, 3 insertions(+), 15 deletions(-) > > diff --git

Re: [Spice-devel] [PATCH v2 1/4] drm/simple-kms: Add drm_simple_encoder_{init, create}()

2020-02-20 Thread Sam Ravnborg
Hi Thomas. On Tue, Feb 18, 2020 at 09:48:12AM +0100, Thomas Zimmermann wrote: > This patch makes the internal encoder implementation of the simple > KMS helpers available to drivers. > > These simple-encoder helpers initialize an encoder with an empty > implementation. This covers the requirement

Re: [Spice-devel] [PATCH v2 3/4] drm/mgag200: Use simple encoder

2020-02-20 Thread Sam Ravnborg
Hi Thomas. On Tue, Feb 18, 2020 at 09:48:14AM +0100, Thomas Zimmermann wrote: > The mgag200 driver uses an empty implementation for its encoder. Replace > the code with the generic simple encoder. > > v2: > * rebase onto new simple-encoder interface > > Signed-off-by: Thomas Zimmermann >

Re: [Spice-devel] [PATCH v2 1/4] drm/simple-kms: Add drm_simple_encoder_{init, create}()

2020-02-20 Thread Sam Ravnborg
Hi Thomas. On Tue, Feb 18, 2020 at 09:48:12AM +0100, Thomas Zimmermann wrote: > This patch makes the internal encoder implementation of the simple > KMS helpers available to drivers. > > These simple-encoder helpers initialize an encoder with an empty > implementation. This covers the requirement

Re: [Spice-devel] [PATCH v2 2/4] drm/ast: Use simple encoder

2020-02-20 Thread Sam Ravnborg
mas Zimmermann >From browsign the code - looks good: Acked-by: Sam Ravnborg Sam > --- > drivers/gpu/drm/ast/ast_drv.h | 6 +- > drivers/gpu/drm/ast/ast_mode.c | 25 - > 2 files changed, 9 insertions(+), 22 deletions(-) > > diff --git

Re: [Spice-devel] [PATCH v1 09/33] drm/qxl: drop use of drmP.h

2019-07-15 Thread Sam Ravnborg
On Mon, Jul 01, 2019 at 08:38:43AM +0200, Gerd Hoffmann wrote: > On Sun, Jun 30, 2019 at 08:18:58AM +0200, Sam Ravnborg wrote: > > Drop use of the deprecated drmP.h header file. > > While touching the files divided includes in blocks, > > and when needed sort the bl

[Spice-devel] [PATCH v1 09/33] drm/qxl: drop use of drmP.h

2019-06-29 Thread Sam Ravnborg
Drop use of the deprecated drmP.h header file. While touching the files divided includes in blocks, and when needed sort the blocks. Fix fallout. Signed-off-by: Sam Ravnborg Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org

Re: [Spice-devel] [PATCH 06/59] drm/prime: Actually remove DRIVER_PRIME everywhere

2019-06-15 Thread Sam Ravnborg
Hi Daniel. Minor nitpick.. > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > index 65d599065709..4fd09a9ad67a 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -3193,7 +3193,7 @@ static struct drm_driver driver = { >

Re: [Spice-devel] [PATCH 01/26] drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install

2019-01-27 Thread Sam Ravnborg
; Cc: spice-devel@lists.freedesktop.org > Cc: amd-...@lists.freedesktop.org > Cc: linux-renesas-...@vger.kernel.org The actual code changes looks good. But if this is the right thing to do I cannot tell. On this (limited) basis I provide an: Reviewed-by: Sam Ravnborg __

Re: [Spice-devel] [PATCH v3 18/23] drm/qxl: remove dead qxl fbdev emulation code

2019-01-25 Thread Sam Ravnborg
Hi Noralf. > > Lovely diffstat, thanks to the new generic fbdev emulation. > > > > drm/qxl/Makefile |2 > > drm/qxl/qxl_draw.c | 232 > > drm/qxl/qxl_drv.h | 21 --- > > drm/qxl/qxl_fb.c | 300 > >

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-23 Thread Sam Ravnborg
Hi Daniel. On Thu, Jan 17, 2019 at 10:03:34PM +0100, Daniel Vetter wrote: > Having the probe helper stuff (which pretty much everyone needs) in > the drm_crtc_helper.h file (which atomic drivers should never need) is > confusing. Split them out. > > To make sure I actually achieved the goal here

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-22 Thread Sam Ravnborg
Hi Daniel et al. > > > > Yeah the drm_crtc_helper.h header is a bit the miniature drmP.h for legacy > > kms drivers. Just removing it from all the atomic drivers caused lots of > > fallout, I expect even more if you entirely remove the includes it has. > > Maybe a todo, care to pls create that pa

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-18 Thread Sam Ravnborg
On Thu, Jan 17, 2019 at 05:45:41PM +0100, Daniel Vetter wrote: > On Wed, Jan 16, 2019 at 07:10:18PM +0100, Sam Ravnborg wrote: > > Hi Daniel. > > > > > v5: Actually try to sort them, and while at it, sort all the ones I > > > touch. > > > > Applied th

Re: [Spice-devel] [PATCH] drm: Split out drm_probe_helper.h

2019-01-16 Thread Sam Ravnborg
any build errros and I somehow lost the motivation. > include/drm/drm_probe_helper.h| 27 +++ This on the other hand is fine - as expected as this is a new file. But the above is just some random comments so: Acked-by: