summaryrefslogtreecommitdiff
path: root/src/xvmc/intel_xvmc.h
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyu.z.wang@intel.com>2007-12-20 12:51:06 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2007-12-20 12:51:06 +0800
commit5f961f28310a1cd19967df2034b0452bf4446394 (patch)
tree4a2fef461034c57f1aa4d0fbc69e4b51d9bb1a98 /src/xvmc/intel_xvmc.h
parent73827e78357ab3f30a21f159ecdfb26dd0ea889b (diff)
xvmc: move dri context handling to generic code
Use XvMCContext's context_id for dri context handling instead of driver private id. Remove unnecessary field for i915 private structs.
Diffstat (limited to 'src/xvmc/intel_xvmc.h')
-rw-r--r--src/xvmc/intel_xvmc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/xvmc/intel_xvmc.h b/src/xvmc/intel_xvmc.h
index d3dc5b22..8a6f8747 100644
--- a/src/xvmc/intel_xvmc.h
+++ b/src/xvmc/intel_xvmc.h
@@ -99,6 +99,12 @@ extern Status _xvmc_create_subpicture(Display *dpy, XvMCContext *context,
extern Status _xvmc_destroy_subpicture(Display *dpy,
XvMCSubpicture *subpicture);
+typedef struct _intel_xvmc_context {
+ XID id; /* context id to X system */
+ drm_context_t hw_context; /* context id to kernel drm */
+ struct _intel_xvmc_context *next;
+} intel_xvmc_context_t, *intel_xvmc_context_ptr;
+
typedef struct _intel_xvmc_drm_map {
drm_handle_t handle;
unsigned long offset;
@@ -142,6 +148,9 @@ typedef struct _intel_xvmc_driver {
int locked;
drmLock *driHwLock;
+ int num_ctx;
+ intel_xvmc_context_ptr ctx_list;
+
void *private;
/* XXX: remove? */
@@ -229,4 +238,7 @@ static inline const char* intel_xvmc_decoder_string(int flag)
return "Unknown decoder";
}
}
+
+extern intel_xvmc_context_ptr intel_xvmc_find_context(XID id);
+
#endif