search for: drm_file

Displaying 20 results from an estimated 551 matches for "drm_file".

2017 Jul 12
2
[PATCH] drm/nouveau: split nouveau_drm_postclose back in pre/postclose
...deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 90757af9bc73..0ca2b65bdc4f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -877,7 +877,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) } static void -nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) +nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv) { struct nouveau_cli *cli = nouveau_cli(fpriv); struct nouveau_drm *drm = nouveau_drm(dev); @@ -892,7 +892,12 @@ nouveau_drm_po...
2024 Aug 12
3
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
.... Only PCI devices with enabled switcheroo do the delayed switching. The call has no effect on other hardware. v2: - move change to drm_lastclose() (Sima) - update docs for vga_switcheroo_process_delayed_switch() Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de> --- drivers/gpu/drm/drm_file.c | 4 ++++ drivers/gpu/vga/vga_switcheroo.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index 714e42b05108..513bef816ae9 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -38,6 +38,7...
2020 Sep 15
1
[PATCH v2 12/21] drm/radeon: Introduce GEM object functions
...r_irq_postinstall_kms(struct drm_device *dev); void radeon_driver_irq_uninstall_kms(struct drm_device *dev); irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg); -void radeon_gem_object_free(struct drm_gem_object *obj); -int radeon_gem_object_open(struct drm_gem_object *obj, - struct drm_file *file_priv); -void radeon_gem_object_close(struct drm_gem_object *obj, - struct drm_file *file_priv); -struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj, - int flags); extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc, unsigned int...
2019 Jul 02
3
[PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers
...container_of((gobj), struct virtio_gpu_object, gem_base) +struct virtio_gpu_object_array { + struct ww_acquire_ctx ticket; + u32 nents, total; + struct drm_gem_object *objs[]; +}; + struct virtio_gpu_vbuffer; struct virtio_gpu_device; @@ -251,6 +257,17 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, struct drm_device *dev, uint32_t handle, uint64_t *offset_p); +struct virtio_gpu_object_array *virtio_gpu_array_alloc(u32 nents); +struct virtio_gpu_object_array* +virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 nents); +void virtio_gpu_a...
2019 Jul 02
3
[PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers
...container_of((gobj), struct virtio_gpu_object, gem_base) +struct virtio_gpu_object_array { + struct ww_acquire_ctx ticket; + u32 nents, total; + struct drm_gem_object *objs[]; +}; + struct virtio_gpu_vbuffer; struct virtio_gpu_device; @@ -251,6 +257,17 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, struct drm_device *dev, uint32_t handle, uint64_t *offset_p); +struct virtio_gpu_object_array *virtio_gpu_array_alloc(u32 nents); +struct virtio_gpu_object_array* +virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 nents); +void virtio_gpu_a...
2019 Jun 20
1
[PATCH v4 07/12] drm/virtio: add virtio_gpu_object_array & helpers
...#define gem_to_virtio_gpu_obj(gobj) \ container_of((gobj), struct virtio_gpu_object, gem_base) +struct virtio_gpu_object_array { + u32 nents; + struct drm_gem_object *objs[]; +}; + struct virtio_gpu_vbuffer; struct virtio_gpu_device; @@ -251,6 +256,11 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, struct drm_device *dev, uint32_t handle, uint64_t *offset_p); +struct virtio_gpu_object_array *virtio_gpu_array_alloc(u32 nents); +struct virtio_gpu_object_array* +virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 nents); +void virtio_gpu_a...
2017 Mar 08
1
[PATCH 14/24] drm/nouveau: Merge pre/postclose hooks
...eletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index f0bb7606eb8b..0e26be017de7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -881,7 +881,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) } static void -nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv) +nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) { struct nouveau_cli *cli = nouveau_cli(fpriv); struct nouveau_drm *drm = nouveau_drm(dev); @@ -897,12 +897,6 @@ nouveau_drm_pr...
2017 May 08
1
[PATCH RESEND 1/4] drm/nouveau: Merge pre/postclose hooks
...eletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 2b6ac24ce690..ec719df619a6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -881,7 +881,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) } static void -nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv) +nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) { struct nouveau_cli *cli = nouveau_cli(fpriv); struct nouveau_drm *drm = nouveau_drm(dev); @@ -897,12 +897,6 @@ nouveau_drm_pr...
2020 Aug 13
2
[PATCH 12/20] drm/radeon: Introduce GEM object functions
...t drm_device *dev); > void radeon_driver_irq_uninstall_kms(struct drm_device *dev); > irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg); > -void radeon_gem_object_free(struct drm_gem_object *obj); > -int radeon_gem_object_open(struct drm_gem_object *obj, > - struct drm_file *file_priv); > -void radeon_gem_object_close(struct drm_gem_object *obj, > - struct drm_file *file_priv); > -struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj, > - int flags); > extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc...
2020 Sep 15
0
[PATCH v2 12/21] drm/radeon: Introduce GEM object functions
...t drm_device *dev); > void radeon_driver_irq_uninstall_kms(struct drm_device *dev); > irqreturn_t radeon_driver_irq_handler_kms(int irq, void *arg); > -void radeon_gem_object_free(struct drm_gem_object *obj); > -int radeon_gem_object_open(struct drm_gem_object *obj, > - struct drm_file *file_priv); > -void radeon_gem_object_close(struct drm_gem_object *obj, > - struct drm_file *file_priv); > -struct dma_buf *radeon_gem_prime_export(struct drm_gem_object *gobj, > - int flags); > extern int radeon_get_crtc_scanoutpos(struct drm_device *dev, unsigned int crtc...
2017 Jul 31
2
[PATCH] Add drm ioctl DRM_IOCTL_MODE_GETFB2 & associated helpers.
...0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -566,8 +566,9 @@ static void amdgpu_user_framebuffer_destroy(struct drm_framebuffer *fb) } static int amdgpu_user_framebuffer_create_handle(struct drm_framebuffer *fb, - struct drm_file *file_priv, - unsigned int *handle) + unsigned int plane_index, + struct drm_file *file_priv, + unsigned int *handle) { struct amdgpu_framebuffer *amdgpu_fb = to_amdgpu_framebuffer(fb); diff --git a/drivers/gpu/drm/armada/armada_fb.c b/drivers/gpu/drm/armada/armada_fb....
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...an aside: The entire vgaswitcheroo code is still a midlayer mess, where the locking is at the wrong layers resulting in the can_switch check potentially being racy. But that's a different can of worms. Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch> > --- > drivers/gpu/drm/drm_file.c | 4 ++++ > drivers/gpu/vga/vga_switcheroo.c | 3 +-- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c > index 714e42b05108..513bef816ae9 100644 > --- a/drivers/gpu/drm/drm_file.c > +++ b/driver...
2020 Sep 15
1
[PATCH v2 01/21] drm/amdgpu: Introduce GEM object functions
...> return 0; > } > @@ -119,8 +123,8 @@ void amdgpu_gem_force_release(struct amdgpu_device *adev) > * Call from drm_gem_handle_create which appear in both new and open ioctl > * case. > */ > -int amdgpu_gem_object_open(struct drm_gem_object *obj, > - struct drm_file *file_priv) > +static int amdgpu_gem_object_open(struct drm_gem_object *obj, > + struct drm_file *file_priv) > { > struct amdgpu_bo *abo = gem_to_amdgpu_bo(obj); > struct amdgpu_device *adev = amdgpu_ttm_adev(abo->tbo.bdev); > @@ -152,8 +156,8 @@ int amdgpu_gem_obj...
2024 Aug 12
9
[PATCH v2 0/9] drm/{amdgpu,nouveau}: Remove old fbdev hooks
...struct drm_mode_config_funcs.output_poll_changed drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 17 ----------- drivers/gpu/drm/drm_fb_helper.c | 37 +++++------------------ drivers/gpu/drm/drm_file.c | 32 ++++++-------------- drivers/gpu/drm/drm_internal.h | 1 - drivers/gpu/drm/drm_probe_helper.c | 10 +----- drivers/gpu/drm/nouveau/dispnv50/disp.c | 1 - drivers/gpu/drm/nouveau/nouveau_display.c | 1 - drivers/gpu/drm/nouveau/nouveau_drm.c | 1 -...
2019 Jun 28
0
[PATCH v5 07/12] drm/virtio: add virtio_gpu_object_array & helpers
...#define gem_to_virtio_gpu_obj(gobj) \ container_of((gobj), struct virtio_gpu_object, gem_base) +struct virtio_gpu_object_array { + u32 nents; + struct drm_gem_object *objs[]; +}; + struct virtio_gpu_vbuffer; struct virtio_gpu_device; @@ -251,6 +256,11 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, struct drm_device *dev, uint32_t handle, uint64_t *offset_p); +struct virtio_gpu_object_array *virtio_gpu_array_alloc(u32 nents); +struct virtio_gpu_object_array* +virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 nents); +void virtio_gpu_a...
2025 Jan 09
25
[PATCH v2 00/25] drm/dumb-buffers: Fix and improve buffer-size calculation
Dumb-buffer pitch and size is specified by width, height, bits-per-pixel plus various hardware-specific alignments. The calculation of these values is inconsistent and duplicated among drivers. The results for formats with bpp < 8 are incorrect. This series fixes this for most drivers. Default scanline pitch and buffer size are now calculated with the existing 4CC helpers. There is a new
2024 Aug 12
2
[PATCH v2 2/9] drm/amdgpu: Do not set struct drm_driver.lastclose
...4,6 @@ extern const int amdgpu_max_kms_ioctl; int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags); void amdgpu_driver_unload_kms(struct drm_device *dev); -void amdgpu_driver_lastclose_kms(struct drm_device *dev); int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv); void amdgpu_driver_postclose_kms(struct drm_device *dev, struct drm_file *file_priv); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 094498a0964b..5dd39e6c6223 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/driver...
2024 Aug 12
1
[PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose()
...Anyway, I got nerdsniped, had an idea, figured best to type it up. Maybe we want to add a link to this to todo.rst, I think we have a vgaswitcheroo entry already. Cheers, Sima > > Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch> > > > --- > > drivers/gpu/drm/drm_file.c | 4 ++++ > > drivers/gpu/vga/vga_switcheroo.c | 3 +-- > > 2 files changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c > > index 714e42b05108..513bef816ae9 100644 > > --- a/drivers/gpu/dr...
2018 Dec 19
0
[PATCH 05/10] drm/virtio: use struct to pass params to virtio_gpu_object_create()
...igned long size; + bool pinned; +}; + struct virtio_gpu_object { struct drm_gem_object gem_base; uint32_t hw_res_handle; @@ -220,16 +225,16 @@ int virtio_gpu_gem_init(struct virtio_gpu_device *vgdev); void virtio_gpu_gem_fini(struct virtio_gpu_device *vgdev); int virtio_gpu_gem_create(struct drm_file *file, struct drm_device *dev, - uint64_t size, + struct virtio_gpu_object_params *params, struct drm_gem_object **obj_p, uint32_t *handle_p); int virtio_gpu_gem_object_open(struct drm_gem_object *obj, struct drm_file *file); void virtio_gpu_gem_object_close(s...
2019 Jul 03
0
[PATCH v6 07/18] drm/virtio: add virtio_gpu_object_array & helpers
...struct virtio_gpu_object_array { > + struct ww_acquire_ctx ticket; > + u32 nents, total; > + struct drm_gem_object *objs[]; > +}; > + > struct virtio_gpu_vbuffer; > struct virtio_gpu_device; > > @@ -251,6 +257,17 @@ int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, > struct drm_device *dev, > uint32_t handle, uint64_t *offset_p); > > +struct virtio_gpu_object_array *virtio_gpu_array_alloc(u32 nents); > +struct virtio_gpu_object_array* > +virtio_gpu_array_from_handles(str...