Displaying 20 results from an estimated 70 matches for "screen_size".
2020 Oct 22
2
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...tatic ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf,
> + size_t count, loff_t *ppos)
> +{
> + loff_t pos = *ppos;
> + size_t total_size;
> + ssize_t ret;
> +
> + if (info->state != FBINFO_STATE_RUNNING)
> + return -EPERM;
> +
> + if (info->screen_size)
> + total_size = info->screen_size;
> + else
> + total_size = info->fix.smem_len;
> +
> + if (pos >= total_size)
> + return 0;
> + if (count >= total_size)
> + count = total_size;
> + if (total_size - count < pos)
> + count = total_size - pos;
>...
2020 Oct 24
1
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...tatic ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf,
> + size_t count, loff_t *ppos)
> +{
> + loff_t pos = *ppos;
> + size_t total_size;
> + ssize_t ret;
> +
> + if (info->state != FBINFO_STATE_RUNNING)
> + return -EPERM;
> +
> + if (info->screen_size)
> + total_size = info->screen_size;
> + else
> + total_size = info->fix.smem_len;
> +
> + if (pos >= total_size)
> + return 0;
> + if (count >= total_size)
> + count = total_size;
> + if (total_size - count < pos)
> + count = total_size - pos;
>...
2020 Oct 20
0
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...unt))
+ return -EFAULT;
+
+ return count;
+}
+
+static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ loff_t pos = *ppos;
+ size_t total_size;
+ ssize_t ret;
+
+ if (info->state != FBINFO_STATE_RUNNING)
+ return -EPERM;
+
+ if (info->screen_size)
+ total_size = info->screen_size;
+ else
+ total_size = info->fix.smem_len;
+
+ if (pos >= total_size)
+ return 0;
+ if (count >= total_size)
+ count = total_size;
+ if (total_size - count < pos)
+ count = total_size - pos;
+
+ if (drm_fbdev_use_iomem(info))
+ ret = fb_read_sc...
2020 Oct 28
0
[PATCH v6 10/10] drm/fb_helper: Support framebuffers in I/O memory
...unt))
+ return -EFAULT;
+
+ return count;
+}
+
+static ssize_t drm_fbdev_fb_read(struct fb_info *info, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ loff_t pos = *ppos;
+ size_t total_size;
+ ssize_t ret;
+
+ if (info->state != FBINFO_STATE_RUNNING)
+ return -EPERM;
+
+ if (info->screen_size)
+ total_size = info->screen_size;
+ else
+ total_size = info->fix.smem_len;
+
+ if (pos >= total_size)
+ return 0;
+ if (count >= total_size)
+ count = total_size;
+ if (total_size - count < pos)
+ count = total_size - pos;
+
+ if (drm_fbdev_use_iomem(info))
+ ret = fb_read_sc...
2020 Oct 22
0
[PATCH v5 10/10] drm/fb_helper: Support framebuffers in I/O memory
...b_info *info, char __user *buf,
>> + size_t count, loff_t *ppos)
>> +{
>> + loff_t pos = *ppos;
>> + size_t total_size;
>> + ssize_t ret;
>> +
>> + if (info->state != FBINFO_STATE_RUNNING)
>> + return -EPERM;
>> +
>> + if (info->screen_size)
>> + total_size = info->screen_size;
>> + else
>> + total_size = info->fix.smem_len;
>> +
>> + if (pos >= total_size)
>> + return 0;
>> + if (count >= total_size)
>> + count = total_size;
>> + if (total_size - count < pos)
&g...
2016 Nov 28
1
[PATCH] drm/virtio: fix framebuffer sparse warning
...+ b/drivers/gpu/drm/virtio/virtgpu_fb.c
@@ -337,7 +337,7 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
info->fbops = &virtio_gpufb_ops;
info->pixmap.flags = FB_PIXMAP_SYSTEM;
- info->screen_base = obj->vmap;
+ info->screen_buffer = obj->vmap;
info->screen_size = obj->gem_base.size;
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
drm_fb_helper_fill_var(info, &vfbdev->helper,
--
1.8.3.1
2016 Nov 28
1
[PATCH] drm/virtio: fix framebuffer sparse warning
...+ b/drivers/gpu/drm/virtio/virtgpu_fb.c
@@ -337,7 +337,7 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
info->fbops = &virtio_gpufb_ops;
info->pixmap.flags = FB_PIXMAP_SYSTEM;
- info->screen_base = obj->vmap;
+ info->screen_buffer = obj->vmap;
info->screen_size = obj->gem_base.size;
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
drm_fb_helper_fill_var(info, &vfbdev->helper,
--
1.8.3.1
2019 Jul 05
0
[PATCH v2 2/6] drm/fb-helper: Map DRM client buffer only when required
...32 format;
+ void *vaddr;
DRM_DEBUG_KMS("surface width(%d), height(%d) and bpp(%d)\n",
sizes->surface_width, sizes->surface_height,
@@ -2200,13 +2210,7 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper,
fbi->fbops = &drm_fbdev_fb_ops;
fbi->screen_size = fb->height * fb->pitches[0];
fbi->fix.smem_len = fbi->screen_size;
- fbi->screen_buffer = buffer->vaddr;
- /* Shamelessly leak the physical address to user-space */
-#if IS_ENABLED(CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM)
- if (drm_leak_fbdev_smem && fbi->fix.smem_start ==...
2020 Oct 16
2
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...t; + unsigned long p = *ppos;
> + u8 *dst;
> + u8 __iomem *src;
> + int c, err = 0;
> + unsigned long total_size;
> + unsigned long alloc_size;
> + ssize_t ret = 0;
> +
> + if (info->state != FBINFO_STATE_RUNNING)
> + return -EPERM;
> +
> + total_size = info->screen_size;
> +
> + if (total_size == 0)
> + total_size = info->fix.smem_len;
> +
> + if (p >= total_size)
> + return 0;
> +
> + if (count >= total_size)
> + count = total_size;
> +
> + if (count + p > total_size)
> + count = total_size - p;
> +
> + sr...
2020 Oct 16
1
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...t; + unsigned long p = *ppos;
> + u8 *dst;
> + u8 __iomem *src;
> + int c, err = 0;
> + unsigned long total_size;
> + unsigned long alloc_size;
> + ssize_t ret = 0;
> +
> + if (info->state != FBINFO_STATE_RUNNING)
> + return -EPERM;
> +
> + total_size = info->screen_size;
> +
> + if (total_size == 0)
> + total_size = info->fix.smem_len;
> +
> + if (p >= total_size)
> + return 0;
> +
> + if (count >= total_size)
> + count = total_size;
> +
> + if (count + p > total_size)
> + count = total_size - p;
> +
> + sr...
2020 Oct 02
2
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...t; + unsigned long p = *ppos;
> + u8 *dst;
> + u8 __iomem *src;
> + int c, err = 0;
> + unsigned long total_size;
> + unsigned long alloc_size;
> + ssize_t ret = 0;
> +
> + if (info->state != FBINFO_STATE_RUNNING)
> + return -EPERM;
> +
> + total_size = info->screen_size;
> +
> + if (total_size == 0)
> + total_size = info->fix.smem_len;
> +
> + if (p >= total_size)
> + return 0;
> +
> + if (count >= total_size)
> + count = total_size;
> +
> + if (count + p > total_size)
> + count = total_size - p;
> +
> + sr...
2020 Oct 15
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...ar __user *buf,
+ size_t count, loff_t *ppos)
+{
+ unsigned long p = *ppos;
+ u8 *dst;
+ u8 __iomem *src;
+ int c, err = 0;
+ unsigned long total_size;
+ unsigned long alloc_size;
+ ssize_t ret = 0;
+
+ if (info->state != FBINFO_STATE_RUNNING)
+ return -EPERM;
+
+ total_size = info->screen_size;
+
+ if (total_size == 0)
+ total_size = info->fix.smem_len;
+
+ if (p >= total_size)
+ return 0;
+
+ if (count >= total_size)
+ count = total_size;
+
+ if (count + p > total_size)
+ count = total_size - p;
+
+ src = (u8 __iomem *)(info->screen_base + p);
+
+ alloc_size = min(cou...
2020 Oct 16
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...> + u8 __iomem *src;
> > + int c, err = 0;
> > + unsigned long total_size;
> > + unsigned long alloc_size;
> > + ssize_t ret = 0;
> > +
> > + if (info->state != FBINFO_STATE_RUNNING)
> > + return -EPERM;
> > +
> > + total_size = info->screen_size;
> > +
> > + if (total_size == 0)
> > + total_size = info->fix.smem_len;
> > +
> > + if (p >= total_size)
> > + return 0;
> > +
> > + if (count >= total_size)
> > + count = total_size;
> > +
> > + if (count + p > total...
2020 Oct 08
1
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...t;>> + unsigned long total_size;
>>> + unsigned long alloc_size;
>>> + ssize_t ret = 0;
>>> +
>>> + if (info->state != FBINFO_STATE_RUNNING)
>>> + return -EPERM;
>>> +
>>> + total_size = info->screen_size;
>>> +
>>> + if (total_size == 0)
>>> + total_size = info->fix.smem_len;
>>> +
>>> + if (p >= total_size)
>>> + return 0;
>>> +
>>> + if (count >= total_size)
>>> +...
2020 Oct 16
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...> + u8 __iomem *src;
> > + int c, err = 0;
> > + unsigned long total_size;
> > + unsigned long alloc_size;
> > + ssize_t ret = 0;
> > +
> > + if (info->state != FBINFO_STATE_RUNNING)
> > + return -EPERM;
> > +
> > + total_size = info->screen_size;
> > +
> > + if (total_size == 0)
> > + total_size = info->fix.smem_len;
> > +
> > + if (p >= total_size)
> > + return 0;
> > +
> > + if (count >= total_size)
> > + count = total_size;
> > +
> > + if (count + p > total...
2019 Jan 24
0
[PATCH 17/26] drm/nouveau: Use drm_fb_helper_fill_info
...= &fb->base;
- strcpy(info->fix.id, "nouveaufb");
if (!chan)
info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_DISABLED;
else
@@ -386,9 +383,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
info->screen_base = nvbo_kmap_obj_iovirtual(fb->nvbo);
info->screen_size = fb->nvbo->bo.mem.num_pages << PAGE_SHIFT;
- drm_fb_helper_fill_fix(info, fb->base.pitches[0],
- fb->base.format->depth);
- drm_fb_helper_fill_var(info, &fbcon->helper, sizes->fb_width, sizes->fb_height);
+ drm_fb_helper_fill_info(info, &fbcon->h...
2006 May 30
1
DOM values in ERB Variable?
I am trying to post the current brower window sizes into the user''s
session file with a form_remote_tag call as follows:
<%= form_remote_tag :url => url_for(:controller => "welcome", :action
=> "login", :iheight => "1", :iwidth => "2") %>
But how do I get the DOM data for window.innerHeight and
window.innerWidth into an
2020 Sep 29
0
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...ar __user *buf,
+ size_t count, loff_t *ppos)
+{
+ unsigned long p = *ppos;
+ u8 *dst;
+ u8 __iomem *src;
+ int c, err = 0;
+ unsigned long total_size;
+ unsigned long alloc_size;
+ ssize_t ret = 0;
+
+ if (info->state != FBINFO_STATE_RUNNING)
+ return -EPERM;
+
+ total_size = info->screen_size;
+
+ if (total_size == 0)
+ total_size = info->fix.smem_len;
+
+ if (p >= total_size)
+ return 0;
+
+ if (count >= total_size)
+ count = total_size;
+
+ if (count + p > total_size)
+ count = total_size - p;
+
+ src = (u8 __iomem *)(info->screen_base + p);
+
+ alloc_size = min(cou...
2019 Mar 26
1
[PATCH 14/21] drm/nouveau: Use drm_fb_helper_fill_info
...con->helper.fb = &fb->base;
- strcpy(info->fix.id, "nouveaufb");
if (!chan)
info->flags = FBINFO_HWACCEL_DISABLED;
else
@@ -386,9 +383,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
info->screen_base = nvbo_kmap_obj_iovirtual(fb->nvbo);
info->screen_size = fb->nvbo->bo.mem.num_pages << PAGE_SHIFT;
- drm_fb_helper_fill_fix(info, fb->base.pitches[0],
- fb->base.format->depth);
- drm_fb_helper_fill_var(info, &fbcon->helper, sizes->fb_width, sizes->fb_height);
+ drm_fb_helper_fill_info(info, &fbcon->h...
2018 Nov 27
3
[PATCH] drm/fbdev: Make skip_vt_switch the default
...rm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index 2480c7d6edee..d6f8d4bbc9fc 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -257,9 +257,6 @@ static int intelfb_create(struct drm_fb_helper *helper,
info->screen_base = vaddr;
info->screen_size = vma->node.size;
- /* This driver doesn't need a VT switch to restore the mode on resume */
- info->skip_vt_switch = true;
-
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->...