search for: drm_fbdev_use_shadow_fb

Displaying 20 results from an estimated 28 matches for "drm_fbdev_use_shadow_fb".

2019 Jul 07
2
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
..._info *info, u32 x, u32 y, > struct drm_clip_rect *clip = &helper->dirty_clip; > unsigned long flags; > > - if (!helper->fb->funcs->dirty) > - return; drm_fb_helper_dirty() is called unconditionally by drm_fb_helper_sys_imageblit() et al, so we need check with drm_fbdev_use_shadow_fb() here. > - > spin_lock_irqsave(&helper->dirty_lock, flags); > clip->x1 = min_t(u32, clip->x1, x); > clip->y1 = min_t(u32, clip->y1, y); > @@ -2166,6 +2165,16 @@ static struct fb_deferred_io drm_fbdev_defio = { > .deferred_io = drm_fb_helper_deferred_io...
2019 Jul 07
2
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
..._info *info, u32 x, u32 y, > struct drm_clip_rect *clip = &helper->dirty_clip; > unsigned long flags; > > - if (!helper->fb->funcs->dirty) > - return; drm_fb_helper_dirty() is called unconditionally by drm_fb_helper_sys_imageblit() et al, so we need check with drm_fbdev_use_shadow_fb() here. > - > spin_lock_irqsave(&helper->dirty_lock, flags); > clip->x1 = min_t(u32, clip->x1, x); > clip->y1 = min_t(u32, clip->y1, y); > @@ -2166,6 +2165,16 @@ static struct fb_deferred_io drm_fbdev_defio = { > .deferred_io = drm_fb_helper_deferred_io...
2020 Oct 16
2
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...t; return -ENODEV; > } > > +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, > + size_t count, loff_t *ppos) > +{ > + struct drm_fb_helper *fb_helper = info->par; > + struct drm_client_buffer *buffer = fb_helper->buffer; > + > + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) > + return drm_fb_helper_sys_read(info, buf, count, ppos); > + else > + return drm_fb_helper_cfb_read(info, buf, count, ppos); > +} > + > +static ssize_t drm_fbdev_fb_write(struct fb_info *info, const char __user *buf, > + size_t c...
2020 Oct 16
1
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...t; return -ENODEV; > } > > +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, > + size_t count, loff_t *ppos) > +{ > + struct drm_fb_helper *fb_helper = info->par; > + struct drm_client_buffer *buffer = fb_helper->buffer; > + > + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) > + return drm_fb_helper_sys_read(info, buf, count, ppos); > + else > + return drm_fb_helper_cfb_read(info, buf, count, ppos); > +} > + > +static ssize_t drm_fbdev_fb_write(struct fb_info *info, const char __user *buf, > + size_t c...
2020 Oct 02
2
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...t; return -ENODEV; > } > > +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, > + size_t count, loff_t *ppos) > +{ > + struct drm_fb_helper *fb_helper = info->par; > + struct drm_client_buffer *buffer = fb_helper->buffer; > + > + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) > + return drm_fb_helper_sys_read(info, buf, count, ppos); > + else > + return drm_fb_helper_cfb_read(info, buf, count, ppos); > +} > + > +static ssize_t drm_fbdev_fb_write(struct fb_info *info, const char __user *buf, > + size_t c...
2020 Oct 15
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...ruct fb_info *info, struct vm_area_struct *vma) return -ENODEV; } +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, + size_t count, loff_t *ppos) +{ + struct drm_fb_helper *fb_helper = info->par; + struct drm_client_buffer *buffer = fb_helper->buffer; + + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) + return drm_fb_helper_sys_read(info, buf, count, ppos); + else + return drm_fb_helper_cfb_read(info, buf, count, ppos); +} + +static ssize_t drm_fbdev_fb_write(struct fb_info *info, const char __user *buf, + size_t count, loff_t *ppos) +{ + struct drm...
2020 Oct 16
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...> > +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, > > + size_t count, loff_t *ppos) > > +{ > > + struct drm_fb_helper *fb_helper = info->par; > > + struct drm_client_buffer *buffer = fb_helper->buffer; > > + > > + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) > > + return drm_fb_helper_sys_read(info, buf, count, ppos); > > + else > > + return drm_fb_helper_cfb_read(info, buf, count, ppos); > > +} > > + > > +static ssize_t drm_fbdev_fb_write(struct fb_info *info, const char &gt...
2020 Oct 08
1
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
..._info *info, char __user *buf, >>> + size_t count, loff_t *ppos) >>> +{ >>> + struct drm_fb_helper *fb_helper = info->par; >>> + struct drm_client_buffer *buffer = fb_helper->buffer; >>> + >>> + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) >>> + return drm_fb_helper_sys_read(info, buf, count, ppos); >>> + else >>> + return drm_fb_helper_cfb_read(info, buf, count, ppos); >>> +} >>> + >>> +static ssize_t drm_fbdev_f...
2020 Oct 16
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...> > +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, > > + size_t count, loff_t *ppos) > > +{ > > + struct drm_fb_helper *fb_helper = info->par; > > + struct drm_client_buffer *buffer = fb_helper->buffer; > > + > > + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) > > + return drm_fb_helper_sys_read(info, buf, count, ppos); > > + else > > + return drm_fb_helper_cfb_read(info, buf, count, ppos); > > +} > > + > > +static ssize_t drm_fbdev_fb_write(struct fb_info *info, const char &gt...
2020 Sep 29
0
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...ruct fb_info *info, struct vm_area_struct *vma) return -ENODEV; } +static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf, + size_t count, loff_t *ppos) +{ + struct drm_fb_helper *fb_helper = info->par; + struct drm_client_buffer *buffer = fb_helper->buffer; + + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) + return drm_fb_helper_sys_read(info, buf, count, ppos); + else + return drm_fb_helper_cfb_read(info, buf, count, ppos); +} + +static ssize_t drm_fbdev_fb_write(struct fb_info *info, const char __user *buf, + size_t count, loff_t *ppos) +{ + struct drm...
2019 Jul 07
0
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
...ruct drm_clip_rect *clip = &helper->dirty_clip; >> unsigned long flags; >> >> - if (!helper->fb->funcs->dirty) >> - return; > > drm_fb_helper_dirty() is called unconditionally by > drm_fb_helper_sys_imageblit() et al, so we need check with > drm_fbdev_use_shadow_fb() here. > >> - >> spin_lock_irqsave(&helper->dirty_lock, flags); >> clip->x1 = min_t(u32, clip->x1, x); >> clip->y1 = min_t(u32, clip->y1, y); >> @@ -2166,6 +2165,16 @@ static struct fb_deferred_io drm_fbdev_defio = { >> .deferred_i...
2020 Oct 02
0
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
..._fb_read(struct fb_info *info, char __user *buf, > > + size_t count, loff_t *ppos) > > +{ > > + struct drm_fb_helper *fb_helper = info->par; > > + struct drm_client_buffer *buffer = fb_helper->buffer; > > + > > + if (drm_fbdev_use_shadow_fb(fb_helper) || !buffer->map.is_iomem) > > + return drm_fb_helper_sys_read(info, buf, count, ppos); > > + else > > + return drm_fb_helper_cfb_read(info, buf, count, ppos); > > +} > > + > > +static ssize_t drm_fbdev_fb_write(struct fb_...
2019 Jul 05
0
[PATCH v2 3/6] drm/fb-helper: Instanciate shadow FB if configured in device's mode_config
...;dirty) - return; - spin_lock_irqsave(&helper->dirty_lock, flags); clip->x1 = min_t(u32, clip->x1, x); clip->y1 = min_t(u32, clip->y1, y); @@ -2166,6 +2165,16 @@ static struct fb_deferred_io drm_fbdev_defio = { .deferred_io = drm_fb_helper_deferred_io, }; +static bool drm_fbdev_use_shadow_fb(struct drm_fb_helper *fb_helper) +{ + struct drm_device *dev = fb_helper->dev; + struct drm_framebuffer *fb = fb_helper->fb; + + return dev->mode_config.prefer_shadow_fbdev | + dev->mode_config.prefer_shadow | + !!fb->funcs->dirty; +} + /** * drm_fb_helper_generic...
2020 Oct 15
19
[PATCH v4 00/10] Support GEM object mappings from I/O memory
DRM's fbdev console uses regular load and store operations to update framebuffer memory. The bochs driver on sparc64 requires the use of I/O-specific load and store operations. We have a workaround, but need a long-term solution to the problem. This patchset changes GEM's vmap/vunmap interfaces to forward pointers of type struct dma_buf_map and updates the generic fbdev emulation to use
2019 Jul 05
11
[PATCH v2 0/6] Unmappable DRM client buffers for fbdev emulation
DRM client buffers are permanently mapped throughout their lifetime. This prevents us from using generic framebuffer emulation for devices with small dedicated video memory, such as ast or mgag200. With fb buffers permanently mapped, such devices often won't have enough space left to display other content (e.g., X11). This patch set introduces unmappable DRM client buffers for framebuffer
2019 Jul 05
11
[PATCH v2 0/6] Unmappable DRM client buffers for fbdev emulation
DRM client buffers are permanently mapped throughout their lifetime. This prevents us from using generic framebuffer emulation for devices with small dedicated video memory, such as ast or mgag200. With fb buffers permanently mapped, such devices often won't have enough space left to display other content (e.g., X11). This patch set introduces unmappable DRM client buffers for framebuffer
2020 Oct 22
2
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...p(struct fb_info *info, struct vm_area_struct *vma) > return -ENODEV; > } > > +static bool drm_fbdev_use_iomem(struct fb_info *info) > +{ > + struct drm_fb_helper *fb_helper = info->par; > + struct drm_client_buffer *buffer = fb_helper->buffer; > + > + return !drm_fbdev_use_shadow_fb(fb_helper) && buffer->map.is_iomem; > +} > + > +static ssize_t fb_read_screen_base(struct fb_info *info, char __user *buf, size_t count, > + loff_t pos) > +{ > + const char __iomem *src = info->screen_base + pos; Maybe a bit much a bikeshed, but I'd write...
2020 Oct 24
1
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...p(struct fb_info *info, struct vm_area_struct *vma) > return -ENODEV; > } > > +static bool drm_fbdev_use_iomem(struct fb_info *info) > +{ > + struct drm_fb_helper *fb_helper = info->par; > + struct drm_client_buffer *buffer = fb_helper->buffer; > + > + return !drm_fbdev_use_shadow_fb(fb_helper) && buffer->map.is_iomem; > +} > + > +static ssize_t fb_read_screen_base(struct fb_info *info, char __user *buf, size_t count, > + loff_t pos) The naming here confused me - a name like: fb_read_iomem() would have helped me more. With the current naming I shal...
2020 Oct 20
0
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...27,6 +2026,206 @@ static int drm_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) return -ENODEV; } +static bool drm_fbdev_use_iomem(struct fb_info *info) +{ + struct drm_fb_helper *fb_helper = info->par; + struct drm_client_buffer *buffer = fb_helper->buffer; + + return !drm_fbdev_use_shadow_fb(fb_helper) && buffer->map.is_iomem; +} + +static ssize_t fb_read_screen_base(struct fb_info *info, char __user *buf, size_t count, + loff_t pos) +{ + const char __iomem *src = info->screen_base + pos; + size_t alloc_size = min(count, PAGE_SIZE); + ssize_t ret = 0; + char *tmp;...
2020 Oct 28
0
[PATCH v6 10/10] drm/fb_helper: Support framebuffers in I/O memory
...27,6 +2026,206 @@ static int drm_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) return -ENODEV; } +static bool drm_fbdev_use_iomem(struct fb_info *info) +{ + struct drm_fb_helper *fb_helper = info->par; + struct drm_client_buffer *buffer = fb_helper->buffer; + + return !drm_fbdev_use_shadow_fb(fb_helper) && buffer->map.is_iomem; +} + +static ssize_t fb_read_screen_base(struct fb_info *info, char __user *buf, size_t count, + loff_t pos) +{ + const char __iomem *src = info->screen_base + pos; + size_t alloc_size = min(count, PAGE_SIZE); + ssize_t ret = 0; + char *tmp;...