intel: Add and use intel_gem_get_param()
Again sharing the same function across all Intel drivers. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19425>
This commit is contained in:
committed by
Marge Bot
parent
c076aeb865
commit
dfd20f002f
@@ -30,6 +30,7 @@
|
||||
#include "c99_compat.h"
|
||||
#include "common/intel_gem.h"
|
||||
#include "dev/intel_device_info.h"
|
||||
#include "intel_gem.h"
|
||||
#include "drm-uapi/i915_drm.h"
|
||||
#include "genxml/gen_macros.h"
|
||||
#include "util/macros.h"
|
||||
@@ -189,11 +190,8 @@ mi_builder_test::SetUp()
|
||||
* --device option with it.
|
||||
*/
|
||||
int device_id;
|
||||
drm_i915_getparam getparam = drm_i915_getparam();
|
||||
getparam.param = I915_PARAM_CHIPSET_ID;
|
||||
getparam.value = &device_id;
|
||||
ASSERT_EQ(drmIoctl(fd, DRM_IOCTL_I915_GETPARAM,
|
||||
(void *)&getparam), 0) << strerror(errno);
|
||||
ASSERT_TRUE(intel_gem_get_param(fd, I915_PARAM_CHIPSET_ID, &device_id))
|
||||
<< strerror(errno);
|
||||
|
||||
ASSERT_TRUE(intel_get_device_info_from_pci_id(device_id, &devinfo));
|
||||
if (devinfo.ver != GFX_VER ||
|
||||
@@ -215,11 +213,8 @@ mi_builder_test::SetUp()
|
||||
if (GFX_VER >= 8) {
|
||||
/* On gfx8+, we require softpin */
|
||||
int has_softpin;
|
||||
drm_i915_getparam getparam = drm_i915_getparam();
|
||||
getparam.param = I915_PARAM_HAS_EXEC_SOFTPIN;
|
||||
getparam.value = &has_softpin;
|
||||
ASSERT_EQ(drmIoctl(fd, DRM_IOCTL_I915_GETPARAM,
|
||||
(void *)&getparam), 0) << strerror(errno);
|
||||
ASSERT_TRUE(intel_gem_get_param(fd, I915_PARAM_HAS_EXEC_SOFTPIN, &has_softpin))
|
||||
<< strerror(errno);
|
||||
ASSERT_TRUE(has_softpin);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user