diff options
author | Dave Airlie <airlied@redhat.com> | 2023-05-19 11:37:52 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2023-05-19 11:37:59 +1000 |
commit | 33a86170888b7e4aa0cea94ebb9c67180139cea9 (patch) | |
tree | bd0d939e4d803a2db28bcbd73a5f28acb720146b /drivers/video/fbdev/arcfb.c | |
parent | f1fcbaa18b28dec10281551dfe6ed3a3ed80e3d6 (diff) | |
parent | 4795c78768bcbd58d4ffab650674d314dc6dd772 (diff) | |
download | linux-stable-33a86170888b7e4aa0cea94ebb9c67180139cea9.tar.gz linux-stable-33a86170888b7e4aa0cea94ebb9c67180139cea9.tar.bz2 linux-stable-33a86170888b7e4aa0cea94ebb9c67180139cea9.zip |
Merge tag 'drm-misc-next-2023-05-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 6.5:
UAPI Changes:
Cross-subsystem Changes:
- arch: Consolidate <asm/fb.h>
Core Changes:
- aperture: Ignore firmware framebuffers with non-primary devices
- fbdev: Use fbdev's I/O helpers
- sysfs: Expose DRM connector ID
- tests: More tests for drm_rect
Driver Changes:
- armada: Implement fbdev emulation as a client
- bridge:
- fsl-ldb: Support i.MX6SX
- lt9211: Remove blanking packets
- lt9611: Remove blanking packets
- tc358768: Implement input bus formats reporting, fix various
timings and clocks settings
- ti-sn65dsi86: Implement wait_hpd_asserted
- nouveau: Improve NULL pointer checks before dereference
- panel:
- nt36523: Support Lenovo J606F
- st7703: Support Anbernic RG353V-V2
- new panels: InnoLux G070ACE-L01
- sun4i: Fix MIPI-DSI dotclock
- vc4: RGB Range toggle property, BT601 and BT2020 support for HDMI
- vkms: Convert to drmm helpers, Add reflection and rotation support
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/2pxmxdzsk2ekjy6xvbpj67zrhtwvkkhfspuvdm5pfm5i54hed6@sooct7yq6z4w
Diffstat (limited to 'drivers/video/fbdev/arcfb.c')
-rw-r--r-- | drivers/video/fbdev/arcfb.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/fbdev/arcfb.c b/drivers/video/fbdev/arcfb.c index 024d0ee4f04f..91ac29b6a89c 100644 --- a/drivers/video/fbdev/arcfb.c +++ b/drivers/video/fbdev/arcfb.c @@ -260,7 +260,7 @@ static void arcfb_lcd_update_page(struct arcfb_par *par, unsigned int upper, ks108_set_yaddr(par, chipindex, upper/8); linesize = par->info->var.xres/8; - src = (unsigned char __force *) par->info->screen_base + (left/8) + + src = (unsigned char *)par->info->screen_buffer + (left/8) + (upper * linesize); ks108_set_xaddr(par, chipindex, left); @@ -451,6 +451,9 @@ static ssize_t arcfb_write(struct fb_info *info, const char __user *buf, struct arcfb_par *par; unsigned int xres; + if (!info->screen_buffer) + return -ENODEV; + p = *ppos; par = info->par; xres = info->var.xres; @@ -468,7 +471,7 @@ static ssize_t arcfb_write(struct fb_info *info, const char __user *buf, if (count) { char *base_addr; - base_addr = (char __force *)info->screen_base; + base_addr = info->screen_buffer; count -= copy_from_user(base_addr + p, buf, count); *ppos += count; err = -EFAULT; @@ -525,7 +528,7 @@ static int arcfb_probe(struct platform_device *dev) if (!info) goto err_fb_alloc; - info->screen_base = (char __iomem *)videomemory; + info->screen_buffer = videomemory; info->fbops = &arcfb_ops; info->var = arcfb_var; @@ -598,7 +601,7 @@ static int arcfb_remove(struct platform_device *dev) unregister_framebuffer(info); if (irq) free_irq(((struct arcfb_par *)(info->par))->irq, info); - vfree((void __force *)info->screen_base); + vfree(info->screen_buffer); framebuffer_release(info); } return 0; |