iris: Drop usage of i915 EXEC_OBJECT_WRITE
The whole usage of this flag is to call iris_use_pinned_bo() with writable argument, for that we don't need any i915_drm.h specific type. IRIS_BLORP_RELOC_FLAGS_EXEC_OBJECT_WRITE could have any other value but keeping the same as i915_drm.h. With this we can drop 2 i915_drm.h imports from generic Iris code. Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21887>
This commit is contained in:

committed by
Marge Bot

parent
660877cf38
commit
631756db56
@@ -44,8 +44,6 @@
|
||||
#include "iris_kmd_backend.h"
|
||||
#include "iris_utrace.h"
|
||||
|
||||
#include "drm-uapi/i915_drm.h"
|
||||
|
||||
#include "common/intel_aux_map.h"
|
||||
#include "intel/common/intel_gem.h"
|
||||
#include "intel/ds/intel_tracepoints.h"
|
||||
|
@@ -31,7 +31,6 @@
|
||||
#include "util/u_dynarray.h"
|
||||
#include "util/perf/u_trace.h"
|
||||
|
||||
#include "drm-uapi/i915_drm.h"
|
||||
#include "common/intel_decoder.h"
|
||||
#include "ds/intel_driver_ds.h"
|
||||
#include "ds/intel_tracepoints.h"
|
||||
@@ -222,8 +221,6 @@ bool iris_batch_references(struct iris_batch *batch, struct iris_bo *bo);
|
||||
|
||||
bool iris_batch_prepare_noop(struct iris_batch *batch, bool noop_enable);
|
||||
|
||||
#define RELOC_WRITE EXEC_OBJECT_WRITE
|
||||
|
||||
void iris_use_pinned_bo(struct iris_batch *batch, struct iris_bo *bo,
|
||||
bool writable, enum iris_domain access);
|
||||
|
||||
|
@@ -245,7 +245,7 @@ iris_blorp_surf_for_resource(struct isl_device *isl_dev,
|
||||
.addr = (struct blorp_address) {
|
||||
.buffer = res->bo,
|
||||
.offset = res->offset,
|
||||
.reloc_flags = is_dest ? EXEC_OBJECT_WRITE : 0,
|
||||
.reloc_flags = is_dest ? IRIS_BLORP_RELOC_FLAGS_EXEC_OBJECT_WRITE : 0,
|
||||
.mocs = iris_mocs(res->bo, isl_dev,
|
||||
is_dest ? ISL_SURF_USAGE_RENDER_TARGET_BIT
|
||||
: ISL_SURF_USAGE_TEXTURE_BIT),
|
||||
@@ -259,7 +259,7 @@ iris_blorp_surf_for_resource(struct isl_device *isl_dev,
|
||||
surf->aux_addr = (struct blorp_address) {
|
||||
.buffer = res->aux.bo,
|
||||
.offset = res->aux.offset,
|
||||
.reloc_flags = is_dest ? EXEC_OBJECT_WRITE : 0,
|
||||
.reloc_flags = is_dest ? IRIS_BLORP_RELOC_FLAGS_EXEC_OBJECT_WRITE : 0,
|
||||
.mocs = iris_mocs(res->bo, isl_dev, 0),
|
||||
.local_hint = devinfo->has_flat_ccs ||
|
||||
iris_bo_likely_local(res->aux.bo),
|
||||
@@ -705,7 +705,7 @@ iris_copy_region(struct blorp_context *blorp,
|
||||
};
|
||||
struct blorp_address dst_addr = {
|
||||
.buffer = dst_res->bo, .offset = dst_res->offset + dstx,
|
||||
.reloc_flags = EXEC_OBJECT_WRITE,
|
||||
.reloc_flags = IRIS_BLORP_RELOC_FLAGS_EXEC_OBJECT_WRITE,
|
||||
.mocs = iris_mocs(dst_res->bo, &screen->isl_dev,
|
||||
ISL_SURF_USAGE_RENDER_TARGET_BIT),
|
||||
.local_hint = iris_bo_likely_local(dst_res->bo),
|
||||
|
@@ -92,7 +92,8 @@ combine_and_pin_address(struct blorp_batch *blorp_batch,
|
||||
struct iris_batch *batch = blorp_batch->driver_batch;
|
||||
struct iris_bo *bo = addr.buffer;
|
||||
|
||||
iris_use_pinned_bo(batch, bo, addr.reloc_flags & RELOC_WRITE,
|
||||
iris_use_pinned_bo(batch, bo,
|
||||
addr.reloc_flags & IRIS_BLORP_RELOC_FLAGS_EXEC_OBJECT_WRITE,
|
||||
IRIS_DOMAIN_NONE);
|
||||
|
||||
/* Assume this is a general address, not relative to a base. */
|
||||
|
@@ -916,6 +916,8 @@ void iris_fill_cs_push_const_buffer(struct brw_cs_prog_data *cs_prog_data,
|
||||
|
||||
|
||||
/* iris_blit.c */
|
||||
#define IRIS_BLORP_RELOC_FLAGS_EXEC_OBJECT_WRITE (1 << 2)
|
||||
|
||||
void iris_blorp_surf_for_resource(struct isl_device *isl_dev,
|
||||
struct blorp_surf *surf,
|
||||
struct pipe_resource *p_res,
|
||||
|
Reference in New Issue
Block a user