Re: [PATCH 4/4] drm: enable -Wformat-truncation across the subsystem

2024-05-23 Thread Sam Ravnborg
Hi Jani, On Thu, May 23, 2024 at 06:51:09PM +0300, Jani Nikula wrote: > With the -Wformat-truncation warnings fixed, finish the job started in > commit a61ddb4393ad ("drm: enable (most) W=1 warnings by default across > the subsystem"), and enable that warning too. > > Signed-off-by: Jani Nikula

Re: [Nouveau] [PATCH 00/22] drm: Remove includes for drm_crtc_helper.h

2023-01-16 Thread Sam Ravnborg
a very nice reduction of bloat! I hope this has a measureable effect on building times. I was working on something similar, but that approach only added missing includes, and did not kill all the unnessesary includes - which I think is the biggest win here. All patches are: Reviewed-by: Sam Ravnbor

Re: [Nouveau] [PATCH 03/22] drm/amdgpu: Remove unnecessary include statements for drm_crtc_helper.h

2023-01-16 Thread Sam Ravnborg
ivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -39,6 +39,7 @@ > #include > #include > #include > +#include Move it one line up to keep the sorting. With this fixed: Reviewed-by: Sam Ravnborg > #include > #include &g

Re: [Nouveau] [PATCH 18/22] drm/sun4i: Remove unnecessary include statements for drm_crtc_helper.h

2023-01-16 Thread Sam Ravnborg
_hdmi.c > index 477cb6985b4d..37dc66332bbd 100644 > --- a/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c > +++ b/drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c > @@ -8,8 +8,8 @@ > #include > #include > > -#include > #include > +#include Move one up to maintain sorting. W

Re: [Nouveau] [PATCH 02/22] drm: Remove unnecessary include statements for drm_crtc_helper.h

2023-01-16 Thread Sam Ravnborg
een the header file and the implementation. I think sparse would also complain that the function is not declared or something like that. With this fixed: Reviewed-by: Sam Ravnborg > #include > #include > #include > diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lea

Re: [Nouveau] [PATCH 05/22] drm/aspeed: Remove unnecessary include statements for drm_crtc_helper.h

2023-01-16 Thread Sam Ravnborg
On Mon, Jan 16, 2023 at 02:12:18PM +0100, Thomas Zimmermann wrote: > Several source files include drm_crtc_helper.h without needing it or > only to get its transitive include statements; leading to unnecessary > compile-time dependencies. > > Directly include required headers and drop

Re: [Nouveau] [PATCH] drm/nouveau: Adding support to control backlight using bl_power for nva3.

2022-10-30 Thread Sam Ravnborg
On Sat, Oct 29, 2022 at 03:48:50PM -0300, antoniospg wrote: > Test plan: > > * Turn off: > echo 1 > /sys/class/backlight/nv_backlight/bl_power > > * Turn on: > echo 0 > /sys/class/backlight/nv_backlight/bl_power > > Signed-off-by: antoniospg > --- > drivers/gpu/drm/nouveau/nouveau_backlight.c

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

2021-11-04 Thread Sam Ravnborg
Hi Javier, > > >>> > >>> - if (vgacon_text_force() && i915_modparams.modeset == -1) > >>> + ret = drm_drv_enabled(); > >> > >> 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 mentioned

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

2021-11-04 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

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

2020-11-24 Thread Sam Ravnborg
.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.pdev >

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

2020-11-24 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

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

2020-11-24 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

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

2020-11-24 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

Re: [Nouveau] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-23 Thread Sam Ravnborg
Hi James. > > > If none of the 140 patches here fix a real bug, and there is no > > > change to machine code then it sounds to me like a W=2 kind of a > > > warning. > > > > FWIW, this series has found at least one bug so far: > >

Re: [Nouveau] [PATCH] drm: remove unneeded break

2020-11-08 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:

Re: [Nouveau] [PATCH] fbcon: Disable accelerated scrolling

2020-10-28 Thread Sam Ravnborg
Hi Daniel. On Wed, Oct 28, 2020 at 05:06:00PM +0100, Daniel Vetter wrote: > So ever since syzbot discovered fbcon, we have solid proof that it's > full of bugs. And often the solution is to just delete code and remove > features, e.g. 50145474f6ef ("fbcon: remove soft scrollback code"). > > Now

Re: [Nouveau] [PATCH] fbcon: Disable accelerated scrolling

2020-10-28 Thread Sam Ravnborg
ere just disables the acceleration code by always > redrawing when scrolling. So far I follow you - and agree. Acked-by: Sam Ravnborg > The plan is that once this has been merged > for well over a year in released kernels, we can start to go around > and delete a lot of code. Why

Re: [Nouveau] [PATCH] drm/: Constify struct drm_driver

2020-10-25 Thread Sam Ravnborg
turned up the following: - The example in drm_drv needs to be updated - legacy drivers, that are obviously not converted - but worth to mention above - arc is not converted and it is not legacy Maybe you have it covered in your big arc conversion patch? With the above fixed: Acked-by: Sam Ravnborg &

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

2020-10-24 Thread Sam Ravnborg
ves 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: Thomas Zi

Re: [Nouveau] [PATCH] drm: remove unneeded break

2020-10-19 Thread Sam Ravnborg
quot;. But after I looked again it was right and the resulting code is more readable - so good. Acked-by: Sam Ravnborg Was tempted to just apply to drm-misc-next but will give others the opportunity to chime in. Sam ___ Nouveau mailing list Nouv

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

2020-10-17 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 |

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

2020-10-17 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 address

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

2020-10-17 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: [Nouveau] [PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-17 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: [Nouveau] [PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory

2020-10-17 Thread Sam Ravnborg
nsider 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 Ravnborg

Re: [Nouveau] Nouveau wiki migration

2020-10-01 Thread Sam Ravnborg
Hi Karol. On Thu, Oct 01, 2020 at 01:36:52PM +0200, Karol Herbst wrote: > On Fri, Sep 25, 2020 at 11:27 PM Karol Herbst wrote: > > > > Hi everybody, > > > > I think it's time to finally move our wiki from the old infrastructure > > over to gitlab pages. > > > > This comes with several benefits:

Re: [Nouveau] [PATCH 20/20] drm: Remove obsolete GEM and PRIME callbacks from struct drm_driver

2020-08-13 Thread Sam Ravnborg
Hi Thomas. On Thu, Aug 13, 2020 at 10:36:44AM +0200, Thomas Zimmermann wrote: > Several GEM and PRIME callbacks have been deprecated in favor of > per-instance GEM object functions. Remove the callbacks as they are > now unused. The only exception is .gem_prime_mmap, which is still > in use by

Re: [Nouveau] [PATCH 1/9] drm/vblank: Add vblank works

2020-04-13 Thread Sam Ravnborg
Hi Tejun > > And, thanks a lot for the vblank explanation. I really enjoyed readin it. :) You were not the only one who liked it :-) We ended up with an updated explanation in drm_vblank.c: https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/drm_vblank.c Including some nice ascii

Re: [Nouveau] [PATCH 0/6] gpu: convert to use new I2C API

2020-03-28 Thread Sam Ravnborg
On Thu, Mar 26, 2020 at 10:09:58PM +0100, Wolfram Sang wrote: > We are deprecating calls which return NULL in favor of new variants which > return an ERR_PTR. Only build tested. > > > Wolfram Sang (6): > drm/amdgpu: convert to use i2c_new_client_device() > drm/gma500: convert to use

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

2019-06-14 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 = { >

[Nouveau] [PATCH v1 3/4] drm/nouveau: drop drmP.h from all header files

2019-05-19 Thread Sam Ravnborg
Drop include of the deprecated drmP.h from all nouveau heder files. This allows us to remove drmP.h from all .c files without any side-effects in a follow-up commit. Build tested using allyeyconfig and allmodconfig Signed-off-by: Sam Ravnborg Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org

[Nouveau] [PATCH v1 0/4] drm/nouveau: drop use of drmP.h

2019-05-19 Thread Sam Ravnborg
patches that was the logical steps to remove the use of drmP.h. Build tested with allmodconfig and allyesconfig for x86, arm, alpha and more. Patchset made on top of drm-misc-next. Sam Sam Ravnborg (4): drm/nouveau: drop use of DRM_UDELAY drm/nouveau: drop drmP.h from

[Nouveau] [PATCH v1 4/4] drm/nouveau: drop use of drmp.h

2019-05-19 Thread Sam Ravnborg
Drop use of the deprecated drmP.h file from drm/nouveau. Build tested using allyesconfig and allmodconfig. Signed-off-by: Sam Ravnborg Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org --- drivers/gpu/drm/nouveau/dispnv04/arb.c | 2 -- drivers/gpu/drm/nouveau/dispnv04/crtc.c| 3

[Nouveau] [PATCH v1 1/4] drm/nouveau: drop use of DRM_UDELAY

2019-05-19 Thread Sam Ravnborg
The DRM_UDELAY is a simple wrapper for udealy() and to be consistent call udelay() direct like in may other places. This avoids the need to pull in drm_os_linux.h when we later drop drmP.h uses in nouveau. Signed-off-by: Sam Ravnborg Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org --- drivers

[Nouveau] [PATCH v1 2/4] drm/nouveau: drop drmP.h from nouveau_drv.h

2019-05-19 Thread Sam Ravnborg
Drop the deprecated drmP.h header from nouveau_drv.h. Fix fallout in other parts of the driver. Build tested using allmodconfig and allyesconfig. Signed-off-by: Sam Ravnborg Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org --- drivers/gpu/drm/nouveau/dispnv50/base507c.c | 2 ++ drivers/gpu

Re: [Nouveau] [PATCH] gpu/drm: Remove duplicate headers

2019-05-07 Thread Sam Ravnborg
On Tue, May 07, 2019 at 12:05:32PM +0200, Daniel Vetter wrote: > On Mon, May 06, 2019 at 04:43:34PM +0200, Daniel Vetter wrote: > > On Fri, May 03, 2019 at 11:28:13PM +0530, jagdsh.li...@gmail.com wrote: > > > From: Jagadeesh Pagadala > > > > > > Remove duplicate headers which are included

Re: [Nouveau] [PATCH] drm: prefix header search paths with $(srctree)/

2019-02-27 Thread Sam Ravnborg
. > > [1]: https://patchwork.kernel.org/patch/9632347/ > > Signed-off-by: Masahiro Yamada Patch looks good: Reviewed-by: Sam Ravnborg > --- > > I put all gpu/drm changes into a single patch because > they are trivial conversion. > > Please let me know if I nee

Re: [Nouveau] [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: [Nouveau] [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

Re: [Nouveau] [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: [Nouveau] [PATCH] drm: Split out drm_probe_helper.h

2019-01-18 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: