summaryrefslogtreecommitdiff
path: root/lib/intel_batchbuffer.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2017-06-02 18:18:38 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-07-05 19:54:02 +0300
commit8b3cc74c6911e9b2835fe6e160f84bae463a70ef (patch)
treee2682d7a53f0e1f6104de88298fe460a0d138f45 /lib/intel_batchbuffer.c
parentdc46b778d84cdcdb36a648189d74cda58e5f7833 (diff)
lib: Constify igt_buf
No one generally needs to modify the igt_bufs we pass around, so make them const. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/intel_batchbuffer.c')
-rw-r--r--lib/intel_batchbuffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index a85c760c..dfc2ce96 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -509,7 +509,7 @@ intel_copy_bo(struct intel_batchbuffer *batch,
* Returns:
* The width of the buffer.
*/
-unsigned igt_buf_width(struct igt_buf *buf)
+unsigned igt_buf_width(const struct igt_buf *buf)
{
return buf->stride/sizeof(uint32_t);
}
@@ -523,7 +523,7 @@ unsigned igt_buf_width(struct igt_buf *buf)
* Returns:
* The height of the buffer.
*/
-unsigned igt_buf_height(struct igt_buf *buf)
+unsigned igt_buf_height(const struct igt_buf *buf)
{
return buf->size/buf->stride;
}
@@ -775,11 +775,11 @@ void igt_blitter_fast_copy__raw(int fd,
* The source and destination surfaces cannot overlap.
*/
void igt_blitter_fast_copy(struct intel_batchbuffer *batch,
- struct igt_buf *src, unsigned src_delta,
+ const struct igt_buf *src, unsigned src_delta,
unsigned src_x, unsigned src_y,
unsigned width, unsigned height,
int bpp,
- struct igt_buf *dst, unsigned dst_delta,
+ const struct igt_buf *dst, unsigned dst_delta,
unsigned dst_x, unsigned dst_y)
{
uint32_t src_pitch, dst_pitch;