diff options
author | Emil Velikov <[email protected]> | 2014-08-19 10:02:35 +0100 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-08-19 17:45:00 +0800 |
commit | f921131a5cebc233749a86cdd44b409c0cecc4ef (patch) | |
tree | ac4bf9fca78a9f87bdab70e86b263680f70038e6 /src/gallium/winsys | |
parent | a4359bcaa599291ef1588376a419a0bcfbd02396 (diff) |
ilo: fold drm_intel_get_aperture_sizes() within probe_winsys()
... and store the value in intel_winsys_info/ilo_dev_info.
Suggested-by: Chia-I Wu <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
olv: check for errors and report raw values
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/intel/drm/intel_drm_winsys.c | 16 | ||||
-rw-r--r-- | src/gallium/winsys/intel/intel_winsys.h | 7 |
2 files changed, 10 insertions, 13 deletions
diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c b/src/gallium/winsys/intel/drm/intel_drm_winsys.c index b394e5fe756..f94a1cb9f33 100644 --- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c +++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c @@ -139,6 +139,12 @@ probe_winsys(struct intel_winsys *winsys) info->devid = drm_intel_bufmgr_gem_get_devid(winsys->bufmgr); + if (drm_intel_get_aperture_sizes(winsys->fd, + &info->aperture_mappable, &info->aperture_total)) { + debug_error("failed to query aperture sizes"); + return false; + } + info->max_batch_size = BATCH_SZ; get_param(winsys, I915_PARAM_HAS_LLC, &val); @@ -223,16 +229,6 @@ intel_winsys_get_info(const struct intel_winsys *winsys) return &winsys->info; } -int -intel_winsys_get_aperture_size(const struct intel_winsys *winsys) -{ - size_t aper_size, mappable_size; - - drm_intel_get_aperture_sizes(winsys->fd, &mappable_size, &aper_size); - - return aper_size >> 20; -} - struct intel_context * intel_winsys_create_context(struct intel_winsys *winsys) { diff --git a/src/gallium/winsys/intel/intel_winsys.h b/src/gallium/winsys/intel/intel_winsys.h index 4bf9a16ee93..679f24817b8 100644 --- a/src/gallium/winsys/intel/intel_winsys.h +++ b/src/gallium/winsys/intel/intel_winsys.h @@ -69,6 +69,10 @@ struct intel_bo; struct intel_winsys_info { int devid; + /* the sizes of the aperture in bytes */ + size_t aperture_total; + size_t aperture_mappable; + int max_batch_size; bool has_llc; bool has_address_swizzling; @@ -91,9 +95,6 @@ intel_winsys_destroy(struct intel_winsys *winsys); const struct intel_winsys_info * intel_winsys_get_info(const struct intel_winsys *winsys); -int -intel_winsys_get_aperture_size(const struct intel_winsys *winsys); - /** * Create a logical context for use with the render ring. */ |