summaryrefslogtreecommitdiff
path: root/lib/intel_bufops.h
diff options
context:
space:
mode:
authorZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2020-10-23 09:30:14 +0200
committerZbigniew Kempczyński <zbigniew.kempczynski@intel.com>2021-04-13 15:44:38 +0200
commitb6cd2a60147af9a67239c110d320178073568699 (patch)
tree02464431647ab8ad2799843987289fd0d7fada93 /lib/intel_bufops.h
parentdceb66a66c34a9022cfa11e4cfc03ae6e5f78dc6 (diff)
lib/intel_bufops: Change size from 32->64 bit
1. Buffer size from 32 -> 64 bit was changed to be consistent with drm code. 2. Remember buffer creation size to avoid recalculation. Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/intel_bufops.h')
-rw-r--r--lib/intel_bufops.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/intel_bufops.h b/lib/intel_bufops.h
index 8debe7f2..5619fc6f 100644
--- a/lib/intel_bufops.h
+++ b/lib/intel_bufops.h
@@ -9,10 +9,13 @@ struct buf_ops;
#define INTEL_BUF_INVALID_ADDRESS (-1ull)
#define INTEL_BUF_NAME_MAXSIZE 32
+#define INVALID_ADDR(x) ((x) == INTEL_BUF_INVALID_ADDRESS)
+
struct intel_buf {
struct buf_ops *bops;
bool is_owner;
uint32_t handle;
+ uint64_t size;
uint32_t tiling;
uint32_t bpp;
uint32_t compression;
@@ -23,7 +26,7 @@ struct intel_buf {
struct {
uint32_t offset;
uint32_t stride;
- uint32_t size;
+ uint64_t size;
} surface[2];
struct {
uint32_t offset;
@@ -88,7 +91,7 @@ intel_buf_ccs_height(int gen, const struct intel_buf *buf)
return DIV_ROUND_UP(intel_buf_height(buf), 512) * 32;
}
-uint32_t intel_buf_bo_size(const struct intel_buf *buf);
+uint64_t intel_buf_bo_size(const struct intel_buf *buf);
struct buf_ops *buf_ops_create(int fd);
struct buf_ops *buf_ops_create_with_selftest(int fd);