Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* Re: [PATCH] staging: sm750fb: fix CamelCase warning for dBase
From: Sarah Schwartz @ 2026-02-14 22:25 UTC (permalink / raw)
  To: a0583214067, Sarah Schwartz
  Cc: Greg KH, sudipm.mukherjee, teddy.wang, linux-fbdev, linux-staging,
	linux-kernel
In-Reply-To: <20260204153856.23277-1-sarah.schwartz025@gmail.com>

From: Greg KH <gregkh@linuxfoundation.org>

On Wed, Feb 04, 2026 at 03:38:56PM +0000, Sarah Schwartz wrote:
> Rename variable dBase to d_base to fix a CamelCase warning reported by checkpath.pl
> This aligns the code with the Linux kernel coding style.
> 
> Signed-off-by: Sarah Schwartz <sarah.schwartz025@gmail.com>
> ---
>  drivers/staging/sm750fb/sm750_accel.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
> index 046b9282b..c77b0fe3b 100644
> --- a/drivers/staging/sm750fb/sm750_accel.c
> +++ b/drivers/staging/sm750fb/sm750_accel.c
> @@ -136,7 +136,7 @@ int sm750_hw_fillrect(struct lynx_accel *accel,
>   * @sPitch: Pitch value of source surface in BYTE
>   * @sx: Starting x coordinate of source surface
>   * @sy: Starting y coordinate of source surface
> - * @dBase: Address of destination: offset in frame buffer
> + * @d_base: Address of destination: offset in frame buffer

what does the "d_" stand for here?

Should that be dest_base instead?

>   * @dPitch: Pitch value of destination surface in BYTE

Why ignore all of these other variables as well?

thanks,

greg k-h


^ permalink raw reply

* Re: [GIT PULL] fbdev fixes and updates for v7.0-rc1
From: Helge Deller @ 2026-02-14 21:28 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-fbdev, dri-devel
In-Reply-To: <177110244909.2897141.11184148040863874004.pr-tracker-bot@kernel.org>

Hi Linus,

* pr-tracker-bot@kernel.org <pr-tracker-bot@kernel.org>:
> The pull request you sent on Sat, 14 Feb 2026 13:06:38 +0100:
> 
> > http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git tags/fbdev-for-7.0-rc1
> 
> has been merged into torvalds/linux.git:
> https://git.kernel.org/torvalds/c/8b3c75a39cc3cde78332f0e10898104a5e1e2807


Linus, I'm really sorry, but I messed up drivers/gpu/drm/Kconfig while
trying to fix a merge conflict.
My patch series should not have touched drivers/gpu/drm/Kconfig at all.
That's purely my fault and not the fault of the patch author.

Can you please revert the changes done to drivers/gpu/drm/Kconfig by
commit 8f582bcd132c ("drm/hyperv: Remove reference to hyperv_fb
driver") or alternatively apply the patch below?

Thanks,
Helge



From ea47a4a9b1e9c0a665df5ef6e6b9bd3653c21d9e Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@gmx.de>
Date: Sat, 14 Feb 2026 22:16:34 +0100
Subject: [PATCH] Partly revert "drm/hyperv: Remove reference to hyperv_fb
 driver"

This partly reverts commit 8f582bcd132cf1290e1fbd56b9f783dabe637dd4
which was messed up by me while trying to fix a merge conflict.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 65db9928439b..d3d52310c9cc 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -265,152 +265,6 @@ config DRM_SCHED
 	tristate
 	depends on DRM
 
-source "drivers/gpu/drm/sysfb/Kconfig"
-
-source "drivers/gpu/drm/arm/Kconfig"
-
-source "drivers/gpu/drm/radeon/Kconfig"
-
-source "drivers/gpu/drm/amd/amdgpu/Kconfig"
-
-source "drivers/gpu/drm/nouveau/Kconfig"
-
-source "drivers/gpu/drm/nova/Kconfig"
-
-source "drivers/gpu/drm/i915/Kconfig"
-
-source "drivers/gpu/drm/xe/Kconfig"
-
-source "drivers/gpu/drm/kmb/Kconfig"
-
-config DRM_VGEM
-	tristate "Virtual GEM provider"
-	depends on DRM && MMU
-	select DRM_GEM_SHMEM_HELPER
-	help
-	  Choose this option to get a virtual graphics memory manager,
-	  as used by Mesa's software renderer for enhanced performance.
-	  If M is selected the module will be called vgem.
-
-source "drivers/gpu/drm/vkms/Kconfig"
-
-source "drivers/gpu/drm/exynos/Kconfig"
-
-source "drivers/gpu/drm/rockchip/Kconfig"
-
-source "drivers/gpu/drm/vmwgfx/Kconfig"
-
-source "drivers/gpu/drm/gma500/Kconfig"
-
-source "drivers/gpu/drm/udl/Kconfig"
-
-source "drivers/gpu/drm/ast/Kconfig"
-
-source "drivers/gpu/drm/mgag200/Kconfig"
-
-source "drivers/gpu/drm/armada/Kconfig"
-
-source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
-
-source "drivers/gpu/drm/renesas/Kconfig"
-
-source "drivers/gpu/drm/sun4i/Kconfig"
-
-source "drivers/gpu/drm/omapdrm/Kconfig"
-
-source "drivers/gpu/drm/tilcdc/Kconfig"
-
-source "drivers/gpu/drm/qxl/Kconfig"
-
-source "drivers/gpu/drm/virtio/Kconfig"
-
-source "drivers/gpu/drm/msm/Kconfig"
-
-source "drivers/gpu/drm/fsl-dcu/Kconfig"
-
-source "drivers/gpu/drm/tegra/Kconfig"
-
-source "drivers/gpu/drm/stm/Kconfig"
-
-source "drivers/gpu/drm/panel/Kconfig"
-
-source "drivers/gpu/drm/bridge/Kconfig"
-
-source "drivers/gpu/drm/sti/Kconfig"
-
-source "drivers/gpu/drm/imx/Kconfig"
-
-source "drivers/gpu/drm/ingenic/Kconfig"
-
-source "drivers/gpu/drm/v3d/Kconfig"
-
-source "drivers/gpu/drm/vc4/Kconfig"
-
-source "drivers/gpu/drm/loongson/Kconfig"
-
-source "drivers/gpu/drm/etnaviv/Kconfig"
-
-source "drivers/gpu/drm/hisilicon/Kconfig"
-
-source "drivers/gpu/drm/logicvc/Kconfig"
-
-source "drivers/gpu/drm/mediatek/Kconfig"
-
-source "drivers/gpu/drm/mxsfb/Kconfig"
-
-source "drivers/gpu/drm/meson/Kconfig"
-
-source "drivers/gpu/drm/tiny/Kconfig"
-
-source "drivers/gpu/drm/pl111/Kconfig"
-
-source "drivers/gpu/drm/tve200/Kconfig"
-
-source "drivers/gpu/drm/xen/Kconfig"
-
-source "drivers/gpu/drm/vboxvideo/Kconfig"
-
-source "drivers/gpu/drm/lima/Kconfig"
-
-source "drivers/gpu/drm/panfrost/Kconfig"
-
-source "drivers/gpu/drm/panthor/Kconfig"
-
-source "drivers/gpu/drm/aspeed/Kconfig"
-
-source "drivers/gpu/drm/mcde/Kconfig"
-
-source "drivers/gpu/drm/tidss/Kconfig"
-
-source "drivers/gpu/drm/adp/Kconfig"
-
-source "drivers/gpu/drm/xlnx/Kconfig"
-
-source "drivers/gpu/drm/gud/Kconfig"
-
-source "drivers/gpu/drm/sitronix/Kconfig"
-
-source "drivers/gpu/drm/solomon/Kconfig"
-
-source "drivers/gpu/drm/sprd/Kconfig"
-
-source "drivers/gpu/drm/imagination/Kconfig"
-
-source "drivers/gpu/drm/tyr/Kconfig"
-
-config DRM_HYPERV
-	tristate "DRM Support for Hyper-V synthetic video device"
-	depends on DRM && PCI && HYPERV_VMBUS
-	select DRM_CLIENT_SELECTION
-	select DRM_KMS_HELPER
-	select DRM_GEM_SHMEM_HELPER
-	help
-	 This is a KMS driver for Hyper-V synthetic video device. Choose this
-	 option if you would like to enable drm driver for Hyper-V virtual
-	 machine.
-
-	 If M is selected the module will be called hyperv_drm.
-
 # Separate option as not all DRM drivers use it
 config DRM_PANEL_BACKLIGHT_QUIRKS
 	tristate

^ permalink raw reply related

* Re: [GIT PULL] fbdev fixes and updates for v7.0-rc1
From: pr-tracker-bot @ 2026-02-14 20:54 UTC (permalink / raw)
  To: Helge Deller; +Cc: Linus Torvalds, linux-kernel, linux-fbdev, dri-devel
In-Reply-To: <aZBlTsIwTzS0tqBD@carbonx1>

The pull request you sent on Sat, 14 Feb 2026 13:06:38 +0100:

> http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git tags/fbdev-for-7.0-rc1

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/8b3c75a39cc3cde78332f0e10898104a5e1e2807

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply

* Re: [PATCH] staging: fbtft: Optimize partial write()
From: Andy Shevchenko @ 2026-02-14 18:06 UTC (permalink / raw)
  To: Nam Cao
  Cc: Andy Shevchenko, Greg Kroah-Hartman, dri-devel, linux-fbdev,
	linux-staging, linux-kernel
In-Reply-To: <87bjhsqe9y.fsf@yellow.woof>

On Sat, Feb 14, 2026 at 08:56:09AM +0700, Nam Cao wrote:
> Andy Shevchenko <andriy.shevchenko@intel.com> writes:
> > On Fri, Feb 13, 2026 at 09:59:46AM +0100, Nam Cao wrote:
> >> When user write() only to part of the screen, the driver still updates the
> >> entire screen. That wastes CPU cycles.
> >> 
> >> Optimize by updating only the changed lines. Improvement is measured by a
> >> pair of trace_printk() at the beginning of fb_write() and at the end of
> >> fbtft_deferred_io().
> >
> > Can you elaborate on the HW (the exact model of the panel and [sub]driver)
> > in use?
> 
> My hardware is the Adafruit's ILI9340. Driver is fbtft/fb_ili9340.c.

Please, add that into commit message.
It will leave the trace that this change has been tested and how.

...

> >> -	/* special case, needed ? */
> >
> > Do you know the history of this comment? What is "special case" and when does it appear?
> 
> This allows caller to pass -1 to "make dirty" the entire screen. The
> only caller that uses this special case is removed in this patch.

Perhaps a small note (summary of the above) to the commit message as well?

...

> > In light of the last TODO line I think that the change is desired by
> > the original author. Nevertheless I am wondering about these side effects
> > that might be (very unlikely?) considered if this code (partial refresh)
> > runs for a significant period of time:
> >
> > - some bits of the screen (on non-updated part) might be flipped
> > - the static picture may lead to wearing of (decolourisation) the panel
> > - what is the thermal distribution (probably with backlight off)?
> >
> > Maybe it makes sense to refresh a full screen from time to time, but
> > TBH my knowledge of TFT panels from last decade is quite limited. I only
> > think from the point of the general physics and common sense. That's
> > why this long footnote rather philosophical, but I would be glad to
> > learn the state of affairs of the modern TFT panels in terms of the
> > physical parameters lasting over the time under different application
> > cases.
> 
> I can't tell you much about TFT panels, sorry. My company used to do a
> demo board with one of them, that's how I have some hardware to play with.
> 
> If user uses mmap() instead of write(), then full refresh is never done
> (well, unless user writes to the entire screen). So if lack of refresh
> is a problem, someone should have noticed already.

Right, that's why I asked more for my own learning.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply

* [GIT PULL] fbdev fixes and updates for v7.0-rc1
From: Helge Deller @ 2026-02-14 12:06 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-fbdev, dri-devel

Hi Linus,

please pull fixes and updates for fbdev for kernel 7.0-rc1.

Thanks to patches from Vincent Mailhol it's now easily possible to replace the
framebuffer penguin boot logo with an own logo at compile time.

The hyperv framebuffer driver has been removed, since the hyperv DRM driver now
seems to provide equal functionality.

Various console_conditional_schedule() calls across the console drivers (fbcon,
printk, vt) have been removed since they don't seem to be necessary any longer.

All other patches are either fixes in au1100fb, au1200fb, ffb, rivafb,
vt8500lcdfb and of_display_timing, or minor cleanups in the fbcon and omapfb
drivers.

All patches have been in for-next for the last 4-12 days without issues, but I
had to rebase to solve a trivial merge conflict with your tree.

Thanks!
Helge

----------------------------------------------------------------

The following changes since commit 770aaedb461a055f79b971d538678942b6607894:

  Merge tag 'bootconfig-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace (2026-02-13 19:33:39 -0800)

are available in the Git repository at:

  http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git tags/fbdev-for-7.0-rc1

for you to fetch changes up to a86039b76e5d1e886d42ec28f569a9ef76409750:

  fbcon: Declare struct fb_info.fbcon_par as of type struct fbcon_par (2026-02-14 11:09:47 +0100)

----------------------------------------------------------------
fbdev fixes & enhancements for 7.0-rc1:

New features:
- Allow custom fbdev boot logo [Vincent Mailhol]

Driver removal:
- fbdev: hyperv_fb: Remove hyperv_fb driver [Prasanna Kumar T S M]

Fixes:
- fbcon: check return value of con2fb_acquire_newinfo() [Andrey Vatoropin]
- fbdev: au1100fb: Check return value of clk_enable() in .resume() [Chen Ni]
- fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe() [Felix Gu]
- fbdev: ffb: fix corrupted video output on Sun FFB1 [René Rebe]
- fbdev: of_display_timing: Fix device node reference leak in of_get_display_timings() [Felix Gu]
- fbdev: of: display_timing: fix refcount leak in of_get_display_timings() [Weigang He]
- fbdev: rivafb: fix divide error in nv3_arb() [Guangshuo Li]
- fbdev: smscufx: properly copy ioctl memory to kernelspace [Greg Kroah-Hartman]
- fbdev: Use device_create_with_groups() to fix sysfs groups registration race [Hans de Goede]
- fbdev: vt8500lcdfb: fix missing dma_free_coherent() [Thomas Fourier]

Cleanups:
- fbcon: printk, vt: Remove console_conditional_schedule() [Sebastian Andrzej Siewior]
- fbcon: Declare struct fb_info.fbcon_par as of type struct fbcon_par [Thomas Zimmermann]
- fbcon: Remove struct fbcon_display.inverse [Thomas Zimmermann]
- fbdev: fix fb_pad_unaligned_buffer mask [Osama Abdelkader]
- fbdev: omapfb: remove duplicate check in omapfb_setup_mem() [Dan Carpenter]
- fbdev: omapfb, sh_mobile_lcdc, fbtft: Make FB_DEVICE dependency optional [Chintan Patel]

----------------------------------------------------------------
Andrey Vatoropin (1):
      fbcon: check return value of con2fb_acquire_newinfo()

Chen Ni (1):
      fbdev: au1100fb: Check return value of clk_enable() in .resume()

Chintan Patel (6):
      fb: Add dev_of_fbinfo() helper for optional sysfs support
      staging: fbtft: Make FB_DEVICE dependency optional
      fbdev: omapfb: Make FB_DEVICE dependency optional
      fbdev: sh_mobile_lcdc: Make FB_DEVICE dependency optional
      staging: fbtft: Fix build failure when CONFIG_FB_DEVICE=n
      staging: fbtft: Make framebuffer registration message debug-only

Dan Carpenter (1):
      fbdev: omapfb: remove duplicate check in omapfb_setup_mem()

Felix Gu (2):
      fbdev: of_display_timing: Fix device node reference leak in of_get_display_timings()
      fbdev: au1200fb: Fix a memory leak in au1200fb_drv_probe()

Greg Kroah-Hartman (1):
      fbdev: smscufx: properly copy ioctl memory to kernelspace

Guangshuo Li (1):
      fbdev: rivafb: fix divide error in nv3_arb()

Hans de Goede (1):
      fbdev: Use device_create_with_groups() to fix sysfs groups registration race

Osama Abdelkader (1):
      fbdev: fix fb_pad_unaligned_buffer mask

Prasanna Kumar T S M (3):
      fbdev: hyperv_fb: Remove hyperv_fb driver
      drivers: hv: vmbus_drv: Remove reference to hpyerv_fb
      drm/hyperv: Remove reference to hyperv_fb driver

René Rebe (1):
      fbdev: ffb: fix corrupted video output on Sun FFB1

Sebastian Andrzej Siewior (1):
      printk, vt, fbcon: Remove console_conditional_schedule()

Thomas Fourier (1):
      fbdev: vt8500lcdfb: fix missing dma_free_coherent()

Thomas Zimmermann (2):
      fbcon: Remove struct fbcon_display.inverse
      fbcon: Declare struct fb_info.fbcon_par as of type struct fbcon_par

Vincent Mailhol (8):
      video/logo: remove orphan .pgm Makefile rule
      video/logo: add a type parameter to the logo makefile function
      video/logo: allow custom logo
      newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224
      sh: defconfig: remove CONFIG_LOGO_SUPERH_*
      video/logo: remove logo_mac_clut224
      video/logo: move logo selection logic to Kconfig
      video/logo: don't select LOGO_LINUX_MONO and LOGO_LINUX_VGA16 by default

Weigang He (1):
      fbdev: of: display_timing: fix refcount leak in of_get_display_timings()

 MAINTAINERS                                     |   10 -
 arch/sh/configs/dreamcast_defconfig             |    2 -
 arch/sh/configs/ecovec24_defconfig              |    2 -
 arch/sh/configs/kfr2r09_defconfig               |    2 -
 arch/sh/configs/migor_defconfig                 |    2 -
 arch/sh/configs/rts7751r2d1_defconfig           |    2 -
 arch/sh/configs/rts7751r2dplus_defconfig        |    2 -
 arch/sh/configs/se7724_defconfig                |    2 -
 arch/sh/configs/se7780_defconfig                |    2 -
 arch/sh/configs/sh7785lcr_defconfig             |    3 -
 arch/sh/configs/urquell_defconfig               |    3 -
 drivers/gpu/drm/Kconfig                         |  146 +++
 drivers/gpu/drm/hyperv/hyperv_drm_proto.c       |   15 +-
 drivers/hv/vmbus_drv.c                          |    4 +-
 drivers/staging/fbtft/Kconfig                   |    5 +-
 drivers/staging/fbtft/fbtft-core.c              |   19 +-
 drivers/staging/fbtft/fbtft-sysfs.c             |   20 +-
 drivers/tty/vt/vt.c                             |    1 -
 drivers/video/console/newport_con.c             |    4 +-
 drivers/video/fbdev/Kconfig                     |   11 -
 drivers/video/fbdev/Makefile                    |    1 -
 drivers/video/fbdev/au1100fb.c                  |    5 +-
 drivers/video/fbdev/au1200fb.c                  |    6 +-
 drivers/video/fbdev/core/fbcon.c                |    9 +-
 drivers/video/fbdev/core/fbcon.h                |    1 -
 drivers/video/fbdev/core/fbmem.c                |    2 +-
 drivers/video/fbdev/core/fbsysfs.c              |   36 +-
 drivers/video/fbdev/ffb.c                       |   14 +-
 drivers/video/fbdev/hyperv_fb.c                 | 1388 --------------------
 drivers/video/fbdev/omap/omapfb_main.c          |   10 +-
 drivers/video/fbdev/omap2/omapfb/Kconfig        |    3 +-
 drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c |   18 +-
 drivers/video/fbdev/riva/riva_hw.c              |    3 +
 drivers/video/fbdev/sh_mobile_lcdcfb.c          |    5 +-
 drivers/video/fbdev/smscufx.c                   |    8 +-
 drivers/video/fbdev/vt8500lcdfb.c               |    5 +-
 drivers/video/logo/Kconfig                      |   82 +-
 drivers/video/logo/Makefile                     |   29 +-
 drivers/video/logo/logo.c                       |   46 +-
 drivers/video/logo/logo_mac_clut224.ppm         | 1604 -----------------------
 drivers/video/of_display_timing.c               |   10 +-
 include/linux/console.h                         |    1 -
 include/linux/fb.h                              |   13 +-
 include/linux/linux_logo.h                      |    8 -
 kernel/printk/printk.c                          |   16 -
 45 files changed, 324 insertions(+), 3256 deletions(-)
 delete mode 100644 drivers/video/fbdev/hyperv_fb.c
 delete mode 100644 drivers/video/logo/logo_mac_clut224.ppm

^ permalink raw reply

* Re: [PATCH] staging: fbtft: Optimize partial write()
From: Nam Cao @ 2026-02-14  1:56 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Andy Shevchenko, Greg Kroah-Hartman, dri-devel, linux-fbdev,
	linux-staging, linux-kernel
In-Reply-To: <aY76ixvOUEkvoPk0@smile.fi.intel.com>

Andy Shevchenko <andriy.shevchenko@intel.com> writes:
> On Fri, Feb 13, 2026 at 09:59:46AM +0100, Nam Cao wrote:
>> When user write() only to part of the screen, the driver still updates the
>> entire screen. That wastes CPU cycles.
>> 
>> Optimize by updating only the changed lines. Improvement is measured by a
>> pair of trace_printk() at the beginning of fb_write() and at the end of
>> fbtft_deferred_io().
>
> Can you elaborate on the HW (the exact model of the panel and [sub]driver)
> in use?

My hardware is the Adafruit's ILI9340. Driver is fbtft/fb_ili9340.c.

...
>> -	/* special case, needed ? */
>
> Do you know the history of this comment? What is "special case" and when does it appear?

This allows caller to pass -1 to "make dirty" the entire screen. The
only caller that uses this special case is removed in this patch.

...
>>  static void fbtft_ops_damage_range(struct fb_info *info, off_t off, size_t len)
>>  {
>>  	struct fbtft_par *par = info->par;
>> +	u32 start, end;
>> +
>> +	start = off / info->fix.line_length;
>> +	end = (off + len - 1) / info->fix.line_length;
>>  
>> -	/* TODO: only mark changed area update all for now */
>
> Ah, this change actually targets the TODO!
>
>> -	par->fbtftops.mkdirty(info, -1, 0);
>> +	par->fbtftops.mkdirty(info, start, end - start + 1);
>>  }
>
> ...
>
> In light of the last TODO line I think that the change is desired by
> the original author. Nevertheless I am wondering about these side effects
> that might be (very unlikely?) considered if this code (partial refresh)
> runs for a significant period of time:
>
> - some bits of the screen (on non-updated part) might be flipped
> - the static picture may lead to wearing of (decolourisation) the panel
> - what is the thermal distribution (probably with backlight off)?
>
> Maybe it makes sense to refresh a full screen from time to time, but
> TBH my knowledge of TFT panels from last decade is quite limited. I only
> think from the point of the general physics and common sense. That's
> why this long footnote rather philosophical, but I would be glad to
> learn the state of affairs of the modern TFT panels in terms of the
> physical parameters lasting over the time under different application
> cases.

I can't tell you much about TFT panels, sorry. My company used to do a
demo board with one of them, that's how I have some hardware to play with.

If user uses mmap() instead of write(), then full refresh is never done
(well, unless user writes to the entire screen). So if lack of refresh
is a problem, someone should have noticed already.

Nam

^ permalink raw reply

* Re: [PATCH v4] staging: sm750fb: Rename nDirection to new_direction
From: Ethan Tidmore @ 2026-02-13 23:36 UTC (permalink / raw)
  To: RachelOvrani, sudipm.mukherjee, teddy.wang, gregkh
  Cc: linux-fbdev, linux-staging, linux-kernel
In-Reply-To: <20260212180402.69356-1-rachel.ovrani@gmail.com>

On Thu Feb 12, 2026 at 12:04 PM CST, RachelOvrani wrote:
> Rename the variable 'nDirection' to 'new_direction'
> to fix the warning reported by checkpatch.pl
>
> Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
> ---

Hi,

This issue has already been fixed in staging-next. Next time when making
patches for staging use staging-next to avoid submitting fixes for
issues that have already been fixed.

Thanks,

ET

^ permalink raw reply

* Re: [PATCH] staging: fbtft: Optimize partial write()
From: Andy Shevchenko @ 2026-02-13 10:18 UTC (permalink / raw)
  To: Nam Cao
  Cc: Andy Shevchenko, Greg Kroah-Hartman, dri-devel, linux-fbdev,
	linux-staging, linux-kernel
In-Reply-To: <20260213085946.3673695-1-namcao@linutronix.de>

On Fri, Feb 13, 2026 at 09:59:46AM +0100, Nam Cao wrote:
> When user write() only to part of the screen, the driver still updates the
> entire screen. That wastes CPU cycles.
> 
> Optimize by updating only the changed lines. Improvement is measured by a
> pair of trace_printk() at the beginning of fb_write() and at the end of
> fbtft_deferred_io().

Can you elaborate on the HW (the exact model of the panel and [sub]driver)
in use?

> Update type         Before     After
> ====================================
> full screen         196ms      200ms
> half screen         200ms      124ms
> quarter screen      193ms       81ms
> one pixle           199ms       43ms
> 
> It is interesting to note that if the deferred IO's delay time (40ms) is
> subtracted, then the time amount scales linearly with the write size.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Some questions below, but they probably won't affect the decision on this change.

...

> -	/* special case, needed ? */

Do you know the history of this comment? What is "special case" and when does it appear?

> -	if (y == -1) {
> -		y = 0;
> -		height = info->var.yres;
> -	}

...

>  static void fbtft_ops_damage_range(struct fb_info *info, off_t off, size_t len)
>  {
>  	struct fbtft_par *par = info->par;
> +	u32 start, end;
> +
> +	start = off / info->fix.line_length;
> +	end = (off + len - 1) / info->fix.line_length;
>  
> -	/* TODO: only mark changed area update all for now */

Ah, this change actually targets the TODO!

> -	par->fbtftops.mkdirty(info, -1, 0);
> +	par->fbtftops.mkdirty(info, start, end - start + 1);
>  }

...

In light of the last TODO line I think that the change is desired by
the original author. Nevertheless I am wondering about these side effects
that might be (very unlikely?) considered if this code (partial refresh)
runs for a significant period of time:

- some bits of the screen (on non-updated part) might be flipped
- the static picture may lead to wearing of (decolourisation) the panel
- what is the thermal distribution (probably with backlight off)?

Maybe it makes sense to refresh a full screen from time to time, but
TBH my knowledge of TFT panels from last decade is quite limited. I only
think from the point of the general physics and common sense. That's
why this long footnote rather philosophical, but I would be glad to
learn the state of affairs of the modern TFT panels in terms of the
physical parameters lasting over the time under different application
cases.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply

* Re: [PATCH] staging: fbtft: Remove duplications of fbtft_set_addr_win()
From: Andy Shevchenko @ 2026-02-13 10:04 UTC (permalink / raw)
  To: Nam Cao
  Cc: Andy Shevchenko, Greg Kroah-Hartman, dri-devel, linux-fbdev,
	linux-staging, linux-kernel
In-Reply-To: <20260213085927.3673653-1-namcao@linutronix.de>

On Fri, Feb 13, 2026 at 09:59:27AM +0100, Nam Cao wrote:
> Lots of drivers duplicate the default fbtft_set_addr_win(). Just use the
> default instead.

Very good catch, indeed you are right and we can simply drop these dups.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply

* [PATCH] staging: fbtft: Optimize partial write()
From: Nam Cao @ 2026-02-13  8:59 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, Nam Cao, dri-devel,
	linux-fbdev, linux-staging, linux-kernel

When user write() only to part of the screen, the driver still updates the
entire screen. That wastes CPU cycles.

Optimize by updating only the changed lines. Improvement is measured by a
pair of trace_printk() at the beginning of fb_write() and at the end of
fbtft_deferred_io().

Update type         Before     After
====================================
full screen         196ms      200ms
half screen         200ms      124ms
quarter screen      193ms       81ms
one pixle           199ms       43ms

It is interesting to note that if the deferred IO's delay time (40ms) is
subtracted, then the time amount scales linearly with the write size.

Signed-off-by: Nam Cao <namcao@linutronix.de>
---
 drivers/staging/fbtft/fbtft-core.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 8a5ccc8ae0a1..16899b979623 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -300,12 +300,6 @@ static void fbtft_mkdirty(struct fb_info *info, int y, int height)
 	struct fbtft_par *par = info->par;
 	struct fb_deferred_io *fbdefio = info->fbdefio;
 
-	/* special case, needed ? */
-	if (y == -1) {
-		y = 0;
-		height = info->var.yres;
-	}
-
 	/* Mark display lines/area as dirty */
 	spin_lock(&par->dirty_lock);
 	if (y < par->dirty_lines_start)
@@ -414,9 +408,12 @@ static int fbtft_fb_blank(int blank, struct fb_info *info)
 static void fbtft_ops_damage_range(struct fb_info *info, off_t off, size_t len)
 {
 	struct fbtft_par *par = info->par;
+	u32 start, end;
+
+	start = off / info->fix.line_length;
+	end = (off + len - 1) / info->fix.line_length;
 
-	/* TODO: only mark changed area update all for now */
-	par->fbtftops.mkdirty(info, -1, 0);
+	par->fbtftops.mkdirty(info, start, end - start + 1);
 }
 
 static void fbtft_ops_damage_area(struct fb_info *info, u32 x, u32 y, u32 width, u32 height)
-- 
2.47.3


^ permalink raw reply related

* [PATCH] staging: fbtft: Remove duplications of fbtft_set_addr_win()
From: Nam Cao @ 2026-02-13  8:59 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, Nam Cao, dri-devel,
	linux-fbdev, linux-staging, linux-kernel

Lots of drivers duplicate the default fbtft_set_addr_win(). Just use the
default instead.

Signed-off-by: Nam Cao <namcao@linutronix.de>
---
 drivers/staging/fbtft/fb_hx8340bn.c |  8 --------
 drivers/staging/fbtft/fb_hx8353d.c  | 13 -------------
 drivers/staging/fbtft/fb_hx8357d.c  | 14 --------------
 drivers/staging/fbtft/fb_ili9340.c  | 12 ------------
 drivers/staging/fbtft/fb_ili9341.c  | 12 ------------
 drivers/staging/fbtft/fb_ili9481.c  | 12 ------------
 drivers/staging/fbtft/fb_ili9486.c  | 12 ------------
 drivers/staging/fbtft/fb_s6d02a1.c  | 12 ------------
 drivers/staging/fbtft/fb_st7735r.c  | 12 ------------
 drivers/staging/fbtft/fb_tinylcd.c  | 12 ------------
 10 files changed, 119 deletions(-)

diff --git a/drivers/staging/fbtft/fb_hx8340bn.c b/drivers/staging/fbtft/fb_hx8340bn.c
index 2fd7b87ea0ce..ca27914f1412 100644
--- a/drivers/staging/fbtft/fb_hx8340bn.c
+++ b/drivers/staging/fbtft/fb_hx8340bn.c
@@ -106,13 +106,6 @@ static int init_display(struct fbtft_par *par)
 	return 0;
 }
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS, 0x00, xs, 0x00, xe);
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS, 0x00, ys, 0x00, ye);
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 static int set_var(struct fbtft_par *par)
 {
 	/* MADCTL - Memory data access control */
@@ -207,7 +200,6 @@ static struct fbtft_display display = {
 	.gamma = DEFAULT_GAMMA,
 	.fbtftops = {
 		.init_display = init_display,
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 		.set_gamma = set_gamma,
 	},
diff --git a/drivers/staging/fbtft/fb_hx8353d.c b/drivers/staging/fbtft/fb_hx8353d.c
index 3e73b69b6a27..f6cd82df4da6 100644
--- a/drivers/staging/fbtft/fb_hx8353d.c
+++ b/drivers/staging/fbtft/fb_hx8353d.c
@@ -61,18 +61,6 @@ static int init_display(struct fbtft_par *par)
 	return 0;
 };
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	/* column address */
-	write_reg(par, 0x2a, xs >> 8, xs & 0xff, xe >> 8, xe & 0xff);
-
-	/* Row address */
-	write_reg(par, 0x2b, ys >> 8, ys & 0xff, ye >> 8, ye & 0xff);
-
-	/* memory write */
-	write_reg(par, 0x2c);
-}
-
 #define my BIT(7)
 #define mx BIT(6)
 #define mv BIT(5)
@@ -130,7 +118,6 @@ static struct fbtft_display display = {
 	.gamma = DEFAULT_GAMMA,
 	.fbtftops = {
 		.init_display = init_display,
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 		.set_gamma = set_gamma,
 	},
diff --git a/drivers/staging/fbtft/fb_hx8357d.c b/drivers/staging/fbtft/fb_hx8357d.c
index 94a357e8fdf6..7b9f020a956f 100644
--- a/drivers/staging/fbtft/fb_hx8357d.c
+++ b/drivers/staging/fbtft/fb_hx8357d.c
@@ -129,19 +129,6 @@ static int init_display(struct fbtft_par *par)
 	return 0;
 }
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
-		  xs >> 8, xs & 0xff,  /* XSTART */
-		  xe >> 8, xe & 0xff); /* XEND */
-
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
-		  ys >> 8, ys & 0xff,  /* YSTART */
-		  ye >> 8, ye & 0xff); /* YEND */
-
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 #define HX8357D_MADCTL_MY  0x80
 #define HX8357D_MADCTL_MX  0x40
 #define HX8357D_MADCTL_MV  0x20
@@ -184,7 +171,6 @@ static struct fbtft_display display = {
 	.gamma_len = 14,
 	.fbtftops = {
 		.init_display = init_display,
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 	},
 };
diff --git a/drivers/staging/fbtft/fb_ili9340.c b/drivers/staging/fbtft/fb_ili9340.c
index 704236bcaf3f..023d8cb96f95 100644
--- a/drivers/staging/fbtft/fb_ili9340.c
+++ b/drivers/staging/fbtft/fb_ili9340.c
@@ -78,17 +78,6 @@ static int init_display(struct fbtft_par *par)
 	return 0;
 }
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
-		  xs >> 8, xs & 0xFF, xe >> 8, xe & 0xFF);
-
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
-		  ys >> 8, ys & 0xFF, ye >> 8, ye & 0xFF);
-
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 #define ILI9340_MADCTL_MV  0x20
 #define ILI9340_MADCTL_MX  0x40
 #define ILI9340_MADCTL_MY  0x80
@@ -122,7 +111,6 @@ static struct fbtft_display display = {
 	.height = HEIGHT,
 	.fbtftops = {
 		.init_display = init_display,
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 	},
 };
diff --git a/drivers/staging/fbtft/fb_ili9341.c b/drivers/staging/fbtft/fb_ili9341.c
index 47e72b87d76d..428922dee9f9 100644
--- a/drivers/staging/fbtft/fb_ili9341.c
+++ b/drivers/staging/fbtft/fb_ili9341.c
@@ -65,17 +65,6 @@ static int init_display(struct fbtft_par *par)
 	return 0;
 }
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
-		  (xs >> 8) & 0xFF, xs & 0xFF, (xe >> 8) & 0xFF, xe & 0xFF);
-
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
-		  (ys >> 8) & 0xFF, ys & 0xFF, (ye >> 8) & 0xFF, ye & 0xFF);
-
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 #define MEM_Y   BIT(7) /* MY row address order */
 #define MEM_X   BIT(6) /* MX column address order */
 #define MEM_V   BIT(5) /* MV row / column exchange */
@@ -139,7 +128,6 @@ static struct fbtft_display display = {
 	.gamma = DEFAULT_GAMMA,
 	.fbtftops = {
 		.init_display = init_display,
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 		.set_gamma = set_gamma,
 	},
diff --git a/drivers/staging/fbtft/fb_ili9481.c b/drivers/staging/fbtft/fb_ili9481.c
index 19eba085ea53..5f31b5d5590f 100644
--- a/drivers/staging/fbtft/fb_ili9481.c
+++ b/drivers/staging/fbtft/fb_ili9481.c
@@ -42,17 +42,6 @@ static const s16 default_init_sequence[] = {
 	-3
 };
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
-		  xs >> 8, xs & 0xff, xe >> 8, xe & 0xff);
-
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
-		  ys >> 8, ys & 0xff, ye >> 8, ye & 0xff);
-
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 #define HFLIP 0x01
 #define VFLIP 0x02
 #define ROW_X_COL 0x20
@@ -86,7 +75,6 @@ static struct fbtft_display display = {
 	.height = HEIGHT,
 	.init_sequence = default_init_sequence,
 	.fbtftops = {
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 	},
 };
diff --git a/drivers/staging/fbtft/fb_ili9486.c b/drivers/staging/fbtft/fb_ili9486.c
index 66210a7137fc..a4d699ef57e4 100644
--- a/drivers/staging/fbtft/fb_ili9486.c
+++ b/drivers/staging/fbtft/fb_ili9486.c
@@ -43,17 +43,6 @@ static const s16 default_init_sequence[] = {
 	-3
 };
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
-		  xs >> 8, xs & 0xFF, xe >> 8, xe & 0xFF);
-
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
-		  ys >> 8, ys & 0xFF, ye >> 8, ye & 0xFF);
-
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 static int set_var(struct fbtft_par *par)
 {
 	switch (par->info->var.rotate) {
@@ -86,7 +75,6 @@ static struct fbtft_display display = {
 	.height = HEIGHT,
 	.init_sequence = default_init_sequence,
 	.fbtftops = {
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 	},
 };
diff --git a/drivers/staging/fbtft/fb_s6d02a1.c b/drivers/staging/fbtft/fb_s6d02a1.c
index d3d6871d8c47..d8ddc804d626 100644
--- a/drivers/staging/fbtft/fb_s6d02a1.c
+++ b/drivers/staging/fbtft/fb_s6d02a1.c
@@ -97,17 +97,6 @@ static const s16 default_init_sequence[] = {
 
 };
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
-		  xs >> 8, xs & 0xFF, xe >> 8, xe & 0xFF);
-
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
-		  ys >> 8, ys & 0xFF, ye >> 8, ye & 0xFF);
-
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 #define MY BIT(7)
 #define MX BIT(6)
 #define MV BIT(5)
@@ -149,7 +138,6 @@ static struct fbtft_display display = {
 	.height = 160,
 	.init_sequence = default_init_sequence,
 	.fbtftops = {
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 	},
 };
diff --git a/drivers/staging/fbtft/fb_st7735r.c b/drivers/staging/fbtft/fb_st7735r.c
index 9670a8989b91..6d9735fa2332 100644
--- a/drivers/staging/fbtft/fb_st7735r.c
+++ b/drivers/staging/fbtft/fb_st7735r.c
@@ -83,17 +83,6 @@ static const s16 default_init_sequence[] = {
 	-3
 };
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
-		  xs >> 8, xs & 0xFF, xe >> 8, xe & 0xFF);
-
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
-		  ys >> 8, ys & 0xFF, ye >> 8, ye & 0xFF);
-
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 #define MY BIT(7)
 #define MX BIT(6)
 #define MV BIT(5)
@@ -168,7 +157,6 @@ static struct fbtft_display display = {
 	.gamma_len = 16,
 	.gamma = DEFAULT_GAMMA,
 	.fbtftops = {
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 		.set_gamma = set_gamma,
 	},
diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c
index 9469248f2c50..fc17e3c687fb 100644
--- a/drivers/staging/fbtft/fb_tinylcd.c
+++ b/drivers/staging/fbtft/fb_tinylcd.c
@@ -47,17 +47,6 @@ static int init_display(struct fbtft_par *par)
 	return 0;
 }
 
-static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
-{
-	write_reg(par, MIPI_DCS_SET_COLUMN_ADDRESS,
-		  xs >> 8, xs & 0xFF, xe >> 8, xe & 0xFF);
-
-	write_reg(par, MIPI_DCS_SET_PAGE_ADDRESS,
-		  ys >> 8, ys & 0xFF, ye >> 8, ye & 0xFF);
-
-	write_reg(par, MIPI_DCS_WRITE_MEMORY_START);
-}
-
 static int set_var(struct fbtft_par *par)
 {
 	switch (par->info->var.rotate) {
@@ -88,7 +77,6 @@ static struct fbtft_display display = {
 	.height = HEIGHT,
 	.fbtftops = {
 		.init_display = init_display,
-		.set_addr_win = set_addr_win,
 		.set_var = set_var,
 	},
 };
-- 
2.47.3


^ permalink raw reply related

* Re: [PATCH v4] staging: sm750fb: Rename nDirection to new_direction
From: Dan Carpenter @ 2026-02-13  5:23 UTC (permalink / raw)
  To: RachelOvrani
  Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
	linux-kernel
In-Reply-To: <20260212180402.69356-1-rachel.ovrani@gmail.com>

On Thu, Feb 12, 2026 at 08:04:02PM +0200, RachelOvrani wrote:
> Rename the variable 'nDirection' to 'new_direction'
> to fix the warning reported by checkpatch.pl
> 
> Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
> ---
>  v3 -> v4 : Directly rename from nDirection to new_direction
>  v2 -> v3 : Change the commit message more appropriately
>  v1 -> v2 : Renaming n_direction to new_direction 

This still doesn't apply against linux-next...

regards,
dan carpenter



^ permalink raw reply

* [PATCH v4] staging: sm750fb: Rename nDirection to new_direction
From: RachelOvrani @ 2026-02-12 18:04 UTC (permalink / raw)
  To: sudipm.mukherjee, teddy.wang, gregkh
  Cc: linux-fbdev, linux-staging, linux-kernel, RachelOvrani

Rename the variable 'nDirection' to 'new_direction'
to fix the warning reported by checkpatch.pl

Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
---
 v3 -> v4 : Directly rename from nDirection to new_direction
 v2 -> v3 : Change the commit message more appropriately
 v1 -> v2 : Renaming n_direction to new_direction 

 drivers/staging/sm750fb/sm750_accel.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index 046b9282b..c796d410c 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -153,9 +153,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		      unsigned int width, unsigned int height,
 		      unsigned int rop2)
 {
-	unsigned int nDirection, de_ctrl;
+	unsigned int new_direction, de_ctrl;
 
-	nDirection = LEFT_TO_RIGHT;
+	new_direction = LEFT_TO_RIGHT;
 	/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */
 	de_ctrl = 0;
 
@@ -173,7 +173,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 			 *	+----------+
 			 */
 
-			nDirection = BOTTOM_TO_TOP;
+			new_direction = BOTTOM_TO_TOP;
 		} else if (sy > dy) {
 			/*  +----------+
 			 *  |D         |
@@ -185,7 +185,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 			 *	+----------+
 			 */
 
-			nDirection = TOP_TO_BOTTOM;
+			new_direction = TOP_TO_BOTTOM;
 		} else {
 			/* sy == dy */
 
@@ -198,7 +198,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 				 * +------+---+------+
 				 */
 
-				nDirection = RIGHT_TO_LEFT;
+				new_direction = RIGHT_TO_LEFT;
 			} else {
 			/* sx > dx */
 
@@ -210,12 +210,12 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 				 * +------+---+------+
 				 */
 
-				nDirection = LEFT_TO_RIGHT;
+				new_direction = LEFT_TO_RIGHT;
 			}
 		}
 	}
 
-	if ((nDirection == BOTTOM_TO_TOP) || (nDirection == RIGHT_TO_LEFT)) {
+	if ((new_direction == BOTTOM_TO_TOP) || (new_direction == RIGHT_TO_LEFT)) {
 		sx += width - 1;
 		sy += height - 1;
 		dx += width - 1;
@@ -277,7 +277,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		  (height & DE_DIMENSION_Y_ET_MASK)); /* dpr08 */
 
 	de_ctrl = (rop2 & DE_CONTROL_ROP_MASK) | DE_CONTROL_ROP_SELECT |
-		((nDirection == RIGHT_TO_LEFT) ? DE_CONTROL_DIRECTION : 0) |
+		((new_direction == RIGHT_TO_LEFT) ? DE_CONTROL_DIRECTION : 0) |
 		DE_CONTROL_COMMAND_BITBLT | DE_CONTROL_STATUS;
 	write_dpr(accel, DE_CONTROL, de_ctrl); /* dpr0c */
 
-- 
2.43.0


^ permalink raw reply related

* Re: [PATCH v3] staging: sm750fb: Rename nDirection to new_direction
From: Dan Carpenter @ 2026-02-12 15:00 UTC (permalink / raw)
  To: RachelOvrani
  Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
	linux-kernel
In-Reply-To: <20260212105842.36431-1-rachel.ovrani@gmail.com>

On Thu, Feb 12, 2026 at 12:58:42PM +0200, RachelOvrani wrote:
> Rename the variable 'nDirection' to 'new_direction'
> to fix the warning reported by checkpatch.pl
> 
> Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
> ---
>  v2 -> v3 : Change the commit message more appropriately 
>  v1 -> v2 : Renaming n_direction to new_direction
> 
>  drivers/staging/sm750fb/sm750_accel.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
> index e1877e5d0..c796d410c 100644
> --- a/drivers/staging/sm750fb/sm750_accel.c
> +++ b/drivers/staging/sm750fb/sm750_accel.c
> @@ -153,9 +153,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
>  		      unsigned int width, unsigned int height,
>  		      unsigned int rop2)
>  {
> -	unsigned int n_direction, de_ctrl;
                     ^^^^^^^^^^^
The old code should be nDirection so this isn't going to apply.

> +	unsigned int new_direction, de_ctrl;


regards,
dan carpenter



^ permalink raw reply

* [PATCH v3] staging: sm750fb: Rename nDirection to new_direction
From: RachelOvrani @ 2026-02-12 10:58 UTC (permalink / raw)
  To: sudipm.mukherjee, teddy.wang, gregkh
  Cc: linux-fbdev, linux-staging, linux-kernel, RachelOvrani

Rename the variable 'nDirection' to 'new_direction'
to fix the warning reported by checkpatch.pl

Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
---
 v2 -> v3 : Change the commit message more appropriately 
 v1 -> v2 : Renaming n_direction to new_direction

 drivers/staging/sm750fb/sm750_accel.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index e1877e5d0..c796d410c 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -153,9 +153,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		      unsigned int width, unsigned int height,
 		      unsigned int rop2)
 {
-	unsigned int n_direction, de_ctrl;
+	unsigned int new_direction, de_ctrl;
 
-	n_direction = LEFT_TO_RIGHT;
+	new_direction = LEFT_TO_RIGHT;
 	/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */
 	de_ctrl = 0;
 
@@ -173,7 +173,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 			 *	+----------+
 			 */
 
-			n_direction = BOTTOM_TO_TOP;
+			new_direction = BOTTOM_TO_TOP;
 		} else if (sy > dy) {
 			/*  +----------+
 			 *  |D         |
@@ -185,7 +185,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 			 *	+----------+
 			 */
 
-			n_direction = TOP_TO_BOTTOM;
+			new_direction = TOP_TO_BOTTOM;
 		} else {
 			/* sy == dy */
 
@@ -198,7 +198,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 				 * +------+---+------+
 				 */
 
-				n_direction = RIGHT_TO_LEFT;
+				new_direction = RIGHT_TO_LEFT;
 			} else {
 			/* sx > dx */
 
@@ -210,12 +210,12 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 				 * +------+---+------+
 				 */
 
-				n_direction = LEFT_TO_RIGHT;
+				new_direction = LEFT_TO_RIGHT;
 			}
 		}
 	}
 
-	if ((n_direction == BOTTOM_TO_TOP) || (n_direction == RIGHT_TO_LEFT)) {
+	if ((new_direction == BOTTOM_TO_TOP) || (new_direction == RIGHT_TO_LEFT)) {
 		sx += width - 1;
 		sy += height - 1;
 		dx += width - 1;
@@ -277,7 +277,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		  (height & DE_DIMENSION_Y_ET_MASK)); /* dpr08 */
 
 	de_ctrl = (rop2 & DE_CONTROL_ROP_MASK) | DE_CONTROL_ROP_SELECT |
-		((n_direction == RIGHT_TO_LEFT) ? DE_CONTROL_DIRECTION : 0) |
+		((new_direction == RIGHT_TO_LEFT) ? DE_CONTROL_DIRECTION : 0) |
 		DE_CONTROL_COMMAND_BITBLT | DE_CONTROL_STATUS;
 	write_dpr(accel, DE_CONTROL, de_ctrl); /* dpr0c */
 
-- 
2.43.0


^ permalink raw reply related

* Re: [PATCH v2] staging: sm750fb: Rename nDirection to new_direction
From: Dan Carpenter @ 2026-02-12 10:13 UTC (permalink / raw)
  To: RachelOvrani
  Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
	linux-kernel
In-Reply-To: <20260212095715.2844-1-rachel.ovrani@gmail.com>

On Thu, Feb 12, 2026 at 11:57:15AM +0200, RachelOvrani wrote:
> Convert the variable 'nDirection' to 'new_direction'
> in drivers/staging/sm750fb/sm750_accel.c to comply
> with Linux kernel coding style guidelines.
> 
> The variable holds a newly calculated direction value,
> so 'new_direction' makes the intent clearer than 'n_direction'.
> 
> Checked with checkpatch.pl --strict: no warnings, no errors

Don't include this sort of thing in the patch description.

> 
> Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
> ---

This patch assumes we applied that previous patch but we won't.

https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/

regards,
dan carpenter


^ permalink raw reply

* [PATCH v2] staging: sm750fb: Rename nDirection to new_direction
From: RachelOvrani @ 2026-02-12  9:57 UTC (permalink / raw)
  To: dan.carpenter
  Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
	linux-kernel, RachelOvrani

Convert the variable 'nDirection' to 'new_direction'
in drivers/staging/sm750fb/sm750_accel.c to comply
with Linux kernel coding style guidelines.

The variable holds a newly calculated direction value,
so 'new_direction' makes the intent clearer than 'n_direction'.

Checked with checkpatch.pl --strict: no warnings, no errors

Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
---
 drivers/staging/sm750fb/sm750_accel.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index e1877e5d0..c796d410c 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -153,9 +153,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		      unsigned int width, unsigned int height,
 		      unsigned int rop2)
 {
-	unsigned int n_direction, de_ctrl;
+	unsigned int new_direction, de_ctrl;
 
-	n_direction = LEFT_TO_RIGHT;
+	new_direction = LEFT_TO_RIGHT;
 	/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */
 	de_ctrl = 0;
 
@@ -173,7 +173,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 			 *	+----------+
 			 */
 
-			n_direction = BOTTOM_TO_TOP;
+			new_direction = BOTTOM_TO_TOP;
 		} else if (sy > dy) {
 			/*  +----------+
 			 *  |D         |
@@ -185,7 +185,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 			 *	+----------+
 			 */
 
-			n_direction = TOP_TO_BOTTOM;
+			new_direction = TOP_TO_BOTTOM;
 		} else {
 			/* sy == dy */
 
@@ -198,7 +198,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 				 * +------+---+------+
 				 */
 
-				n_direction = RIGHT_TO_LEFT;
+				new_direction = RIGHT_TO_LEFT;
 			} else {
 			/* sx > dx */
 
@@ -210,12 +210,12 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 				 * +------+---+------+
 				 */
 
-				n_direction = LEFT_TO_RIGHT;
+				new_direction = LEFT_TO_RIGHT;
 			}
 		}
 	}
 
-	if ((n_direction == BOTTOM_TO_TOP) || (n_direction == RIGHT_TO_LEFT)) {
+	if ((new_direction == BOTTOM_TO_TOP) || (new_direction == RIGHT_TO_LEFT)) {
 		sx += width - 1;
 		sy += height - 1;
 		dx += width - 1;
@@ -277,7 +277,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		  (height & DE_DIMENSION_Y_ET_MASK)); /* dpr08 */
 
 	de_ctrl = (rop2 & DE_CONTROL_ROP_MASK) | DE_CONTROL_ROP_SELECT |
-		((n_direction == RIGHT_TO_LEFT) ? DE_CONTROL_DIRECTION : 0) |
+		((new_direction == RIGHT_TO_LEFT) ? DE_CONTROL_DIRECTION : 0) |
 		DE_CONTROL_COMMAND_BITBLT | DE_CONTROL_STATUS;
 	write_dpr(accel, DE_CONTROL, de_ctrl); /* dpr0c */
 
-- 
2.43.0


^ permalink raw reply related

* Re: [PATCH] staging: sm750fb: convert nDirection to snake_case
From: Dan Carpenter @ 2026-02-12  5:35 UTC (permalink / raw)
  To: Rachel Ovrani
  Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
	linux-kernel
In-Reply-To: <CAPs_yZVzsHMqiMwWqM7m_7q9CRGDwRcHiAbx4VModZnCNzc0fQ@mail.gmail.com>

On Thu, Feb 12, 2026 at 12:24:44AM +0200, Rachel Ovrani wrote:
> Thank you for the review!
> 
> The 'n_' prefix stands for "new" - the variable holds a newly calculated
> direction value based on the overlap between source and destination regions.
> 
> That said, if you think 'direction' would be clearer, I'm happy to submit a
> v2 removing the prefix.

I would have never guessed it was new_.  Normally n_ means number and I
couldn't think of any meaning in Hungarian notation.  Naming it
"new_direction" is even better.

regards,
dan carpenter


^ permalink raw reply

* Re: [PATCH -next v8 1/3] rust: clist: Add support to interface with C linked lists
From: Danilo Krummrich @ 2026-02-11 21:17 UTC (permalink / raw)
  To: Joel Fernandes
  Cc: linux-kernel, Maarten Lankhorst, Maxime Ripard, Simona Vetter,
	Jonathan Corbet, Alex Deucher, Christian König, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, Huang Rui,
	Matthew Auld, Matthew Brost, Lucas De Marchi,
	Thomas Hellström, Helge Deller, Alice Ryhl, Miguel Ojeda,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Alistair Popple,
	Alexandre Courbot, Andrea Righi, Zhi Wang, Philipp Stanner,
	Elle Rhumsaa, Daniel Almeida, joel, nouveau, dri-devel,
	rust-for-linux, linux-doc, amd-gfx, intel-gfx, intel-xe,
	linux-fbdev
In-Reply-To: <20260211210952.GA3632639@joelbox2>

On Wed Feb 11, 2026 at 10:09 PM CET, Joel Fernandes wrote:
> On Tue, Feb 10, 2026 at 11:07:37AM +0100, Danilo Krummrich wrote:
>> On Mon Feb 9, 2026 at 10:42 PM CET, Joel Fernandes wrote:
>> >  rust/kernel/clist.rs   | 320 +++++++++++++++++++++++++++++++++++++++++
>> 
>> I think we should move this under rust/kernel/ffi/ to make it obvious that this
>> is FFI infrastructure.
>> 
>> > diff --git a/rust/kernel/clist.rs b/rust/kernel/clist.rs
>> > new file mode 100644
>> > index 000000000000..8aa72b5d54be
>> > --- /dev/null
>> > +++ b/rust/kernel/clist.rs
>> > @@ -0,0 +1,320 @@
>> > +// SPDX-License-Identifier: GPL-2.0
>> > +
>> > +//! A C doubly circular intrusive linked list interface for rust code.
>> 
>> Here and in the struct documentation, I'd suggest to clearly point out the
>> use-cases, i.e. that this infrastructure is for FFI use-cases only and should
>> not be used otherwise in drivers, etc
>
> I am curious why we would not want to have drivers be able to use CList. I
> thought that was the point of making it pub at the module/item level as well.
> I think it is possible a rust driver may have a reference to a CList in the
> future.

It is a (partially) unsafe API built to support FFI interactions. The absolute
majority of drivers should not have any FFI interactions themselves. nova-core
is the "odd one" as it will have an interface with a C driver (vGPU).

Besides a few "odd" drivers, there may be quite some subsystem abstractions that
become users of the API. In the future build system, subsystems and drivers will
become individual crates.

> But I will update the current usecase above, as you suggested, good point.

^ permalink raw reply

* Re: [PATCH -next v8 1/3] rust: clist: Add support to interface with C linked lists
From: Joel Fernandes @ 2026-02-11 21:09 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: linux-kernel, Maarten Lankhorst, Maxime Ripard, Simona Vetter,
	Jonathan Corbet, Alex Deucher, Christian König, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, Huang Rui,
	Matthew Auld, Matthew Brost, Lucas De Marchi,
	Thomas Hellström, Helge Deller, Alice Ryhl, Miguel Ojeda,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Alistair Popple,
	Alexandre Courbot, Andrea Righi, Zhi Wang, Philipp Stanner,
	Elle Rhumsaa, Daniel Almeida, joel, nouveau, dri-devel,
	rust-for-linux, linux-doc, amd-gfx, intel-gfx, intel-xe,
	linux-fbdev
In-Reply-To: <DGB75XMWML8M.DFZY5L52EBQF@kernel.org>

On Tue, Feb 10, 2026 at 11:07:37AM +0100, Danilo Krummrich wrote:
> On Mon Feb 9, 2026 at 10:42 PM CET, Joel Fernandes wrote:
> >  rust/kernel/clist.rs   | 320 +++++++++++++++++++++++++++++++++++++++++
> 
> I think we should move this under rust/kernel/ffi/ to make it obvious that this
> is FFI infrastructure.
> 
> > diff --git a/rust/kernel/clist.rs b/rust/kernel/clist.rs
> > new file mode 100644
> > index 000000000000..8aa72b5d54be
> > --- /dev/null
> > +++ b/rust/kernel/clist.rs
> > @@ -0,0 +1,320 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +//! A C doubly circular intrusive linked list interface for rust code.
> 
> Here and in the struct documentation, I'd suggest to clearly point out the
> use-cases, i.e. that this infrastructure is for FFI use-cases only and should
> not be used otherwise in drivers, etc

I am curious why we would not want to have drivers be able to use CList. I
thought that was the point of making it pub at the module/item level as well.
I think it is possible a rust driver may have a reference to a CList in the
future.

But I will update the current usecase above, as you suggested, good point.

thanks,

 - Joel


^ permalink raw reply

* Re: [PATCH -next v9 0/3] rust: Add CList and GPU buddy allocator bindings
From: Joel Fernandes @ 2026-02-11 17:30 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: linux-kernel, Maarten Lankhorst, Maxime Ripard, Simona Vetter,
	Jonathan Corbet, Alex Deucher, Christian König, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, Huang Rui,
	Matthew Auld, Matthew Brost, Lucas De Marchi,
	Thomas Hellström, Helge Deller, Alice Ryhl, Miguel Ojeda,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Alistair Popple,
	Alexandre Courbot, Andrea Righi, Zhi Wang, Philipp Stanner,
	Elle Rhumsaa, Daniel Almeida, David Airlie, Edwin Peer,
	John Hubbard, Andy Ritger, Balbir Singh, Timur Tabi, joel,
	nouveau, dri-devel, rust-for-linux, linux-doc, amd-gfx, intel-gfx,
	intel-xe, linux-fbdev
In-Reply-To: <DGC0RDIBDEYB.195QJ6S6GF9WL@kernel.org>



On 2/11/2026 4:19 AM, Danilo Krummrich wrote:
> On Wed Feb 11, 2026 at 12:32 AM CET, Joel Fernandes wrote:
>> Link to v8: https://lore.kernel.org/all/20260209214246.2783990-1-joelagnelf@nvidia.com/
>> Link to v7: https://lore.kernel.org/all/20260206004110.1914814-1-joelagnelf@nvidia.com/
> 
> I already asked about this in [1], can you please add a changlog to your series?

Sure, I will do that. My bad. (I did include good cover-letters in earlier
series, but missed on this one). Thanks for pointing it out.

--
Joel Fernandes


^ permalink raw reply

* Re: [PATCH -next v9 1/3] rust: clist: Add support to interface with C linked lists
From: Joel Fernandes @ 2026-02-11 17:28 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: linux-kernel, Maarten Lankhorst, Maxime Ripard, Simona Vetter,
	Jonathan Corbet, Alex Deucher, Christian König, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, Huang Rui,
	Matthew Auld, Matthew Brost, Lucas De Marchi,
	Thomas Hellström, Helge Deller, Alice Ryhl, Miguel Ojeda,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Alistair Popple,
	Alexandre Courbot, Andrea Righi, Zhi Wang, Philipp Stanner,
	Elle Rhumsaa, Daniel Almeida, David Airlie, Edwin Peer,
	John Hubbard, Andy Ritger, Balbir Singh, Timur Tabi, joel,
	nouveau, dri-devel, rust-for-linux, linux-doc, amd-gfx, intel-gfx,
	intel-xe, linux-fbdev
In-Reply-To: <DGC0UXBRSOPZ.PG0X6KTEA3RJ@kernel.org>



On 2/11/2026 4:23 AM, Danilo Krummrich wrote:
> On Wed Feb 11, 2026 at 12:32 AM CET, Joel Fernandes wrote:
>> Add a new module `clist` for working with C's doubly circular linked
>> lists. Provide low-level iteration over list nodes.
>>
>> Typed iteration over actual items is provided with a `clist_create`
>> macro to assist in creation of the `CList` type.
>>
>> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
>> Acked-by: Gary Guo <gary@garyguo.net>
>> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
> 
> I think you forgot to address my comments from [1].
> 
> [1] https://lore.kernel.org/all/DGB75XMWML8M.DFZY5L52EBQF@kernel.org/

Indeed I missed that reply, sorry. Will address them.

Thanks.

--
Joel Fernandes


^ permalink raw reply

* Re: [PATCH] staging: sm750fb: convert nDirection to snake_case
From: Dan Carpenter @ 2026-02-11 15:11 UTC (permalink / raw)
  To: RachelOvrani
  Cc: sudipm.mukherjee, teddy.wang, gregkh, linux-fbdev, linux-staging,
	linux-kernel
In-Reply-To: <20260211142423.4922-1-rachel.ovrani@gmail.com>

On Wed, Feb 11, 2026 at 04:24:22PM +0200, RachelOvrani wrote:
> Convert the variable 'nDirection' to 'n_direction'
> in drivers/staging/sm750fb/sm750_accel.c to comply
> with Linux kernel coding style guidelines.
> 
> Checked with checkpatch.pl --strict: no warnings, no errors
> 
> Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
> ---

What does the n_ stand for?  You can probably remove it?

regards,
dan carpenter


^ permalink raw reply

* [PATCH] staging: sm750fb: convert nDirection to snake_case
From: RachelOvrani @ 2026-02-11 14:24 UTC (permalink / raw)
  To: sudipm.mukherjee, teddy.wang, gregkh
  Cc: linux-fbdev, linux-staging, linux-kernel, RachelOvrani

Convert the variable 'nDirection' to 'n_direction'
in drivers/staging/sm750fb/sm750_accel.c to comply
with Linux kernel coding style guidelines.

Checked with checkpatch.pl --strict: no warnings, no errors

Signed-off-by: RachelOvrani <rachel.ovrani@gmail.com>
---
 drivers/staging/sm750fb/sm750_accel.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index 046b9282b..e1877e5d0 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -153,9 +153,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		      unsigned int width, unsigned int height,
 		      unsigned int rop2)
 {
-	unsigned int nDirection, de_ctrl;
+	unsigned int n_direction, de_ctrl;
 
-	nDirection = LEFT_TO_RIGHT;
+	n_direction = LEFT_TO_RIGHT;
 	/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */
 	de_ctrl = 0;
 
@@ -173,7 +173,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 			 *	+----------+
 			 */
 
-			nDirection = BOTTOM_TO_TOP;
+			n_direction = BOTTOM_TO_TOP;
 		} else if (sy > dy) {
 			/*  +----------+
 			 *  |D         |
@@ -185,7 +185,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 			 *	+----------+
 			 */
 
-			nDirection = TOP_TO_BOTTOM;
+			n_direction = TOP_TO_BOTTOM;
 		} else {
 			/* sy == dy */
 
@@ -198,7 +198,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 				 * +------+---+------+
 				 */
 
-				nDirection = RIGHT_TO_LEFT;
+				n_direction = RIGHT_TO_LEFT;
 			} else {
 			/* sx > dx */
 
@@ -210,12 +210,12 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 				 * +------+---+------+
 				 */
 
-				nDirection = LEFT_TO_RIGHT;
+				n_direction = LEFT_TO_RIGHT;
 			}
 		}
 	}
 
-	if ((nDirection == BOTTOM_TO_TOP) || (nDirection == RIGHT_TO_LEFT)) {
+	if ((n_direction == BOTTOM_TO_TOP) || (n_direction == RIGHT_TO_LEFT)) {
 		sx += width - 1;
 		sy += height - 1;
 		dx += width - 1;
@@ -277,7 +277,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,
 		  (height & DE_DIMENSION_Y_ET_MASK)); /* dpr08 */
 
 	de_ctrl = (rop2 & DE_CONTROL_ROP_MASK) | DE_CONTROL_ROP_SELECT |
-		((nDirection == RIGHT_TO_LEFT) ? DE_CONTROL_DIRECTION : 0) |
+		((n_direction == RIGHT_TO_LEFT) ? DE_CONTROL_DIRECTION : 0) |
 		DE_CONTROL_COMMAND_BITBLT | DE_CONTROL_STATUS;
 	write_dpr(accel, DE_CONTROL, de_ctrl); /* dpr0c */
 
-- 
2.43.0


^ permalink raw reply related

* Re: [PATCH -next v9 1/3] rust: clist: Add support to interface with C linked lists
From: Danilo Krummrich @ 2026-02-11  9:23 UTC (permalink / raw)
  To: Joel Fernandes
  Cc: linux-kernel, Maarten Lankhorst, Maxime Ripard, Simona Vetter,
	Jonathan Corbet, Alex Deucher, Christian König, Jani Nikula,
	Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, Huang Rui,
	Matthew Auld, Matthew Brost, Lucas De Marchi,
	Thomas Hellström, Helge Deller, Alice Ryhl, Miguel Ojeda,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Alistair Popple,
	Alexandre Courbot, Andrea Righi, Zhi Wang, Philipp Stanner,
	Elle Rhumsaa, Daniel Almeida, David Airlie, Edwin Peer,
	John Hubbard, Andy Ritger, Balbir Singh, Timur Tabi, joel,
	nouveau, dri-devel, rust-for-linux, linux-doc, amd-gfx, intel-gfx,
	intel-xe, linux-fbdev
In-Reply-To: <20260210233204.790524-2-joelagnelf@nvidia.com>

On Wed Feb 11, 2026 at 12:32 AM CET, Joel Fernandes wrote:
> Add a new module `clist` for working with C's doubly circular linked
> lists. Provide low-level iteration over list nodes.
>
> Typed iteration over actual items is provided with a `clist_create`
> macro to assist in creation of the `CList` type.
>
> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
> Acked-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>

I think you forgot to address my comments from [1].

[1] https://lore.kernel.org/all/DGB75XMWML8M.DFZY5L52EBQF@kernel.org/

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox