mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-26 17:00:12 +01:00
Merge branch 'master' of ../../drm into modesetting-101
Conflicts: linux-core/drmP.h linux-core/drm_drv.c linux-core/drm_proc.c linux-core/drm_stub.c linux-core/drm_sysfs.c
This commit is contained in:
commit
e00dea812d
5 changed files with 17 additions and 4 deletions
|
|
@ -761,9 +761,10 @@ struct drm_driver {
|
|||
};
|
||||
|
||||
#define DRM_MINOR_UNASSIGNED 0
|
||||
#define DRM_MINOR_CONTROL 1
|
||||
#define DRM_MINOR_LEGACY 2
|
||||
#define DRM_MINOR_LEGACY 1
|
||||
#define DRM_MINOR_CONTROL 2
|
||||
#define DRM_MINOR_RENDER 3
|
||||
|
||||
/**
|
||||
* DRM minor structure. This structure represents a drm minor number.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1065,7 +1065,7 @@ static int drm_bo_busy(struct drm_buffer_object *bo)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int drm_bo_evict_cached(struct drm_buffer_object *bo)
|
||||
int drm_bo_evict_cached(struct drm_buffer_object *bo)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
|
@ -1075,6 +1075,7 @@ static int drm_bo_evict_cached(struct drm_buffer_object *bo)
|
|||
return ret;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(drm_bo_evict_cached);
|
||||
/*
|
||||
* Wait until a buffer is unmapped.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -700,7 +700,7 @@ extern int drm_bo_do_validate(struct drm_buffer_object *bo,
|
|||
uint64_t flags, uint64_t mask, uint32_t hint,
|
||||
uint32_t fence_class,
|
||||
struct drm_bo_info_rep *rep);
|
||||
|
||||
extern int drm_bo_evict_cached(struct drm_buffer_object *bo);
|
||||
/*
|
||||
* Buffer object memory move- and map helpers.
|
||||
* drm_bo_move.c
|
||||
|
|
|
|||
|
|
@ -355,6 +355,10 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
|
|||
if ((ret = dev->driver->load(dev, ent->driver_data)))
|
||||
goto err_g5;
|
||||
|
||||
if (dev->driver->load)
|
||||
if ((ret = dev->driver->load(dev, ent->driver_data)))
|
||||
goto err_g4;
|
||||
|
||||
DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n",
|
||||
driver->name, driver->major, driver->minor, driver->patchlevel,
|
||||
driver->date, dev->primary->index);
|
||||
|
|
|
|||
|
|
@ -805,6 +805,7 @@ struct i915_relocatee_info {
|
|||
struct drm_bo_kmap_obj kmap;
|
||||
int is_iomem;
|
||||
int idle;
|
||||
int evicted;
|
||||
};
|
||||
|
||||
struct drm_i915_validate_buffer {
|
||||
|
|
@ -877,6 +878,12 @@ int i915_apply_reloc(struct drm_file *file_priv, int num_buffers,
|
|||
relocatee->data_page = drm_bmo_virtual(&relocatee->kmap,
|
||||
&relocatee->is_iomem);
|
||||
relocatee->page_offset = (relocatee->offset & PAGE_MASK);
|
||||
|
||||
if (!relocatee->evicted &&
|
||||
relocatee->buf->mem.flags & DRM_BO_FLAG_CACHED_MAPPED) {
|
||||
drm_bo_evict_cached(relocatee->buf);
|
||||
relocatee->evicted = 1;
|
||||
}
|
||||
}
|
||||
|
||||
val = buffers[buf_index].buffer->offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue