[Libva] [PATCH 1/4] dri: cope with drm_state changes.
Gwenole Beauchesne
gb.devel at gmail.com
Tue Jul 3 07:43:33 PDT 2012
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
---
src/i965_drv_video.c | 4 ++--
src/intel_driver.c | 14 +++++++-------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 41f8b0f..f662645 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -3262,7 +3262,7 @@ i965_PutSurface(VADriverContextP ctx,
return VA_STATUS_SUCCESS;
#endif
struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+ struct dri_state *dri_state = (struct dri_state *)ctx->drm_state;
struct i965_render_state *render_state = &i965->render_state;
struct dri_drawable *dri_drawable;
union dri_buffer *buffer;
@@ -3275,7 +3275,7 @@ i965_PutSurface(VADriverContextP ctx,
int pp_flag = 0;
/* Currently don't support DRI1 */
- if (dri_state->driConnectedFlag != VA_DRI2)
+ if (dri_state->base.type != VA_DRI2)
return VA_STATUS_ERROR_UNKNOWN;
/* Some broken sources such as H.264 conformance case FM2_SVA_C
diff --git a/src/intel_driver.c b/src/intel_driver.c
index 4e6df81..4ed67c9 100644
--- a/src/intel_driver.c
+++ b/src/intel_driver.c
@@ -29,7 +29,7 @@
#include <assert.h>
-#include <va/va_dricommon.h>
+#include <va/va_drmcommon.h>
#include "intel_batchbuffer.h"
#include "intel_memman.h"
@@ -50,15 +50,15 @@ Bool
intel_driver_init(VADriverContextP ctx)
{
struct intel_driver_data *intel = intel_driver_data(ctx);
- struct dri_state *dri_state = (struct dri_state *)ctx->dri_state;
+ struct drm_state * const drm_state = (struct drm_state *)ctx->drm_state;
int has_exec2, has_bsd, has_blt;
- assert(dri_state);
- assert(dri_state->driConnectedFlag == VA_DRI2 ||
- dri_state->driConnectedFlag == VA_DRI1);
+ assert(drm_state);
+ assert(drm_state->type == VA_DRI2 ||
+ drm_state->type == VA_DRI1);
- intel->fd = dri_state->fd;
- intel->dri2Enabled = (dri_state->driConnectedFlag == VA_DRI2);
+ intel->fd = drm_state->fd;
+ intel->dri2Enabled = (drm_state->type == VA_DRI2);
if (!intel->dri2Enabled) {
return False;
--
1.7.9.5
More information about the Libva
mailing list