projects
/
platform
/
upstream
/
libdrm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not build slp module
[platform/upstream/libdrm.git]
/
intel
/
intel_decode.c
diff --git
a/intel/intel_decode.c
b/intel/intel_decode.c
index
1b80b75
..
a5d6e04
100644
(file)
--- a/
intel/intel_decode.c
+++ b/
intel/intel_decode.c
@@
-21,6
+21,10
@@
* IN THE SOFTWARE.
*/
* IN THE SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
@@
-29,6
+33,8
@@
#include <stdarg.h>
#include <string.h>
#include <stdarg.h>
#include <string.h>
+#include "libdrm.h"
+#include "xf86drm.h"
#include "intel_chipset.h"
#include "intel_bufmgr.h"
#include "intel_chipset.h"
#include "intel_bufmgr.h"
@@
-104,11
+110,7
@@
static float int_as_float(uint32_t intval)
return uval.f;
}
return uval.f;
}
-static void
-instr_out(struct drm_intel_decode *ctx, unsigned int index,
- const char *fmt, ...) __attribute__((format(__printf__, 3, 4)));
-
-static void
+static void DRM_PRINTFLIKE(3, 4)
instr_out(struct drm_intel_decode *ctx, unsigned int index,
const char *fmt, ...)
{
instr_out(struct drm_intel_decode *ctx, unsigned int index,
const char *fmt, ...)
{
@@
-3815,7
+3817,7
@@
decode_3d_i830(struct drm_intel_decode *ctx)
return 1;
}
return 1;
}
-struct drm_intel_decode *
+
drm_public
struct drm_intel_decode *
drm_intel_decode_context_alloc(uint32_t devid)
{
struct drm_intel_decode *ctx;
drm_intel_decode_context_alloc(uint32_t devid)
{
struct drm_intel_decode *ctx;
@@
-3827,7
+3829,9
@@
drm_intel_decode_context_alloc(uint32_t devid)
ctx->devid = devid;
ctx->out = stdout;
ctx->devid = devid;
ctx->out = stdout;
- if (IS_GEN7(devid))
+ if (IS_GEN8(devid))
+ ctx->gen = 8;
+ else if (IS_GEN7(devid))
ctx->gen = 7;
else if (IS_GEN6(devid))
ctx->gen = 6;
ctx->gen = 7;
else if (IS_GEN6(devid))
ctx->gen = 6;
@@
-3845,20
+3849,20
@@
drm_intel_decode_context_alloc(uint32_t devid)
return ctx;
}
return ctx;
}
-void
+
drm_public
void
drm_intel_decode_context_free(struct drm_intel_decode *ctx)
{
free(ctx);
}
drm_intel_decode_context_free(struct drm_intel_decode *ctx)
{
free(ctx);
}
-void
+
drm_public
void
drm_intel_decode_set_dump_past_end(struct drm_intel_decode *ctx,
int dump_past_end)
{
ctx->dump_past_end = !!dump_past_end;
}
drm_intel_decode_set_dump_past_end(struct drm_intel_decode *ctx,
int dump_past_end)
{
ctx->dump_past_end = !!dump_past_end;
}
-void
+
drm_public
void
drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx,
void *data, uint32_t hw_offset, int count)
{
drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx,
void *data, uint32_t hw_offset, int count)
{
@@
-3867,7
+3871,7
@@
drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx,
ctx->base_count = count;
}
ctx->base_count = count;
}
-void
+
drm_public
void
drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
uint32_t head, uint32_t tail)
{
drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
uint32_t head, uint32_t tail)
{
@@
-3875,7
+3879,7
@@
drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
ctx->tail = tail;
}
ctx->tail = tail;
}
-void
+
drm_public
void
drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,
FILE *out)
{
drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,
FILE *out)
{
@@
-3889,7
+3893,7
@@
drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,
* \param count number of DWORDs to decode in the batch buffer
* \param hw_offset hardware address for the buffer
*/
* \param count number of DWORDs to decode in the batch buffer
* \param hw_offset hardware address for the buffer
*/
-void
+
drm_public
void
drm_intel_decode(struct drm_intel_decode *ctx)
{
int ret;
drm_intel_decode(struct drm_intel_decode *ctx)
{
int ret;