diff options
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr')
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrdri.c | 5 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrdri.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrdriext.c | 23 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrhostglx.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c | 38 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrinit.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/hostx.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/hostx.h | 2 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/os.c | 2 |
9 files changed, 33 insertions, 47 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdri.c b/xorg-server/hw/kdrive/ephyr/ephyrdri.c index 50554364c..3a4a06301 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrdri.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrdri.c @@ -137,18 +137,19 @@ ephyrDRIGetClientDriverName(int a_screen, Bool ephyrDRICreateContext(int a_screen, int a_visual_id, - XID *a_returned_ctxt_id, drm_context_t * a_hw_ctxt) + CARD32 ctxt_id, drm_context_t * a_hw_ctxt) { Display *dpy = hostx_get_display(); Bool is_ok = FALSE; Visual v; + XID returned_ctxt_id = ctxt_id; EPHYR_LOG("enter. screen:%d, visual:%d\n", a_screen, a_visual_id); memset(&v, 0, sizeof(v)); v.visualid = a_visual_id; is_ok = XF86DRICreateContext(dpy, DefaultScreen(dpy), - &v, a_returned_ctxt_id, a_hw_ctxt); + &v, &returned_ctxt_id, a_hw_ctxt); EPHYR_LOG("leave:%d\n", is_ok); return is_ok; } diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdri.h b/xorg-server/hw/kdrive/ephyr/ephyrdri.h index d28910f29..8f2d3026e 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrdri.h +++ b/xorg-server/hw/kdrive/ephyr/ephyrdri.h @@ -43,7 +43,7 @@ Bool ephyrDRIGetClientDriverName(int a_screen, char **a_client_driver_name); Bool ephyrDRICreateContext(int a_screen, int a_visual_id, - XID *a_returned_ctx_id, drm_context_t * a_hw_ctx); + CARD32 ctx_id, drm_context_t * a_hw_ctx); Bool ephyrDRIDestroyContext(int a_screen, int a_context_id); Bool ephyrDRICreateDrawable(int a_screen, int a_drawable, drm_drawable_t * a_hw_drawable); diff --git a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c index 144c6e1ac..617ffb158 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrdriext.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrdriext.c @@ -189,7 +189,6 @@ static void ephyrDRIMoveWindow(WindowPtr a_win, int a_x, int a_y, WindowPtr a_siblings, VTKind a_kind) { - Bool is_ok = FALSE; ScreenPtr screen = NULL; EphyrDRIScreenPrivPtr screen_priv = NULL; EphyrDRIWindowPrivPtr win_priv = NULL; @@ -214,18 +213,16 @@ ephyrDRIMoveWindow(WindowPtr a_win, EPHYR_LOG("window: %p\n", a_win); if (!a_win->parent) { EPHYR_LOG("cannot move root window\n"); - is_ok = TRUE; - goto out; + return; } win_priv = GET_EPHYR_DRI_WINDOW_PRIV(a_win); if (!win_priv) { EPHYR_LOG("not a DRI peered window\n"); - is_ok = TRUE; - goto out; + return; } if (!findWindowPairFromLocal(a_win, &pair) || !pair) { EPHYR_LOG_ERROR("failed to get window pair\n"); - goto out; + return; } /*compute position relative to parent window */ x = a_win->drawable.x - a_win->parent->drawable.x; @@ -237,11 +234,6 @@ ephyrDRIMoveWindow(WindowPtr a_win, geo.width = a_win->drawable.width; geo.height = a_win->drawable.height; hostx_set_window_geometry(pair->remote, &geo); - is_ok = TRUE; - - out: - EPHYR_LOG("leave. is_ok:%d\n", is_ok); - /*do cleanup here */ } static Bool @@ -297,7 +289,6 @@ ephyrDRIPositionWindow(WindowPtr a_win, int a_x, int a_y) static void ephyrDRIClipNotify(WindowPtr a_win, int a_x, int a_y) { - Bool is_ok = FALSE; ScreenPtr screen = NULL; EphyrDRIScreenPrivPtr screen_priv = NULL; EphyrDRIWindowPrivPtr win_priv = NULL; @@ -323,7 +314,6 @@ ephyrDRIClipNotify(WindowPtr a_win, int a_x, int a_y) win_priv = GET_EPHYR_DRI_WINDOW_PRIV(a_win); if (!win_priv) { EPHYR_LOG("not a DRI peered window\n"); - is_ok = TRUE; goto out; } if (!findWindowPairFromLocal(a_win, &pair) || !pair) { @@ -343,9 +333,8 @@ ephyrDRIClipNotify(WindowPtr a_win, int a_x, int a_y) * push the clipping region of this window * to the peer window in the host */ - is_ok = hostx_set_window_bounding_rectangles + hostx_set_window_bounding_rectangles (pair->remote, rects, RegionNumRects(&a_win->clipList)); - is_ok = TRUE; out: free(rects); @@ -727,7 +716,6 @@ ProcXF86DRICreateContext(register ClientPtr client) ScreenPtr pScreen; VisualPtr visual; int i = 0; - unsigned long context_id = 0; REQUEST(xXF86DRICreateContextReq); REQUEST_SIZE_MATCH(xXF86DRICreateContextReq); @@ -750,10 +738,9 @@ ProcXF86DRICreateContext(register ClientPtr client) return BadValue; } - context_id = stuff->context; if (!ephyrDRICreateContext(stuff->screen, stuff->visual, - &context_id, + stuff->context, (drm_context_t *) &rep.hHWContext)) { return BadValue; } diff --git a/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c b/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c index 6a4392fee..5ecb02d23 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrhostglx.c @@ -274,7 +274,6 @@ ephyrHostGLXGetVisualConfigsInternal(enum VisualConfRequestType a_type, xGLXGetVisualConfigsReply reply; char *server_glx_version = NULL, *server_glx_extensions = NULL; int j = 0, - screens = 0, major_opcode = 0, num_props = 0, num_visuals = 0, props_buf_size = 0, props_per_visual_size = 0; @@ -282,7 +281,6 @@ ephyrHostGLXGetVisualConfigsInternal(enum VisualConfRequestType a_type, EPHYR_RETURN_VAL_IF_FAIL(dpy, FALSE); - screens = ScreenCount(dpy); if (!ephyrHostGLXGetMajorOpcode(&major_opcode)) { EPHYR_LOG_ERROR("failed to get opcode\n"); goto out; diff --git a/xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c b/xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c index 05e9ad9f5..99f0f5071 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrhostvideo.c @@ -58,7 +58,7 @@ #endif /*FALSE*/ static XExtensionInfo _xv_info_data; static XExtensionInfo *xv_info = &_xv_info_data; -static char *xv_extension_name = XvName; +static const char *xv_extension_name = XvName; static char *xv_error_string(Display * dpy, int code, XExtCodes * codes, char *buf, int n); static int xv_close_display(Display * dpy, XExtCodes * codes); @@ -78,7 +78,7 @@ static XExtensionHooks xv_extension_hooks = { xv_error_string /* error_string */ }; -static char *xv_error_list[] = { +static const char *xv_error_list[] = { "BadPort", /* XvBadPort */ "BadEncoding", /* XvBadEncoding */ "BadControl" /* XvBadControl */ @@ -311,7 +311,7 @@ char ephyrHostXVAdaptorGetType(const EphyrHostXVAdaptor * a_this) { EPHYR_RETURN_VAL_IF_FAIL(a_this, -1); - return ((XvAdaptorInfo *) a_this)->type; + return ((const XvAdaptorInfo *) a_this)->type; } const char * @@ -319,7 +319,7 @@ ephyrHostXVAdaptorGetName(const EphyrHostXVAdaptor * a_this) { EPHYR_RETURN_VAL_IF_FAIL(a_this, NULL); - return ((XvAdaptorInfo *) a_this)->name; + return ((const XvAdaptorInfo *) a_this)->name; } EphyrHostVideoFormat * @@ -333,16 +333,16 @@ ephyrHostXVAdaptorGetVideoFormats(const EphyrHostXVAdaptor * a_this, EPHYR_RETURN_VAL_IF_FAIL(a_this, NULL); - nb_formats = ((XvAdaptorInfo *) a_this)->num_formats; + nb_formats = ((const XvAdaptorInfo *) a_this)->num_formats; formats = calloc(nb_formats, sizeof(EphyrHostVideoFormat)); for (i = 0; i < nb_formats; i++) { memset(&visual_info_template, 0, sizeof(visual_info_template)); visual_info_template.visualid = - ((XvAdaptorInfo *) a_this)->formats[i].visual_id; + ((const XvAdaptorInfo *) a_this)->formats[i].visual_id; visual_info = XGetVisualInfo(hostx_get_display(), VisualIDMask, &visual_info_template, &nb_visual_info); - formats[i].depth = ((XvAdaptorInfo *) a_this)->formats[i].depth; + formats[i].depth = ((const XvAdaptorInfo *) a_this)->formats[i].depth; formats[i].visual_class = visual_info->class; XFree(visual_info); } @@ -356,7 +356,7 @@ ephyrHostXVAdaptorGetNbPorts(const EphyrHostXVAdaptor * a_this) { EPHYR_RETURN_VAL_IF_FAIL(a_this, -1); - return ((XvAdaptorInfo *) a_this)->num_ports; + return ((const XvAdaptorInfo *) a_this)->num_ports; } int @@ -364,7 +364,7 @@ ephyrHostXVAdaptorGetFirstPortID(const EphyrHostXVAdaptor * a_this) { EPHYR_RETURN_VAL_IF_FAIL(a_this, -1); - return ((XvAdaptorInfo *) a_this)->base_id; + return ((const XvAdaptorInfo *) a_this)->base_id; } Bool @@ -372,8 +372,8 @@ ephyrHostXVAdaptorHasPutVideo(const EphyrHostXVAdaptor * a_this, Bool *a_result) { EPHYR_RETURN_VAL_IF_FAIL(a_this && a_result, FALSE); - if ((((XvAdaptorInfo *) a_this)->type & (XvVideoMask | XvInputMask)) == - (XvVideoMask | XvInputMask)) + if ((((const XvAdaptorInfo *) a_this)->type & + (XvVideoMask | XvInputMask)) == (XvVideoMask | XvInputMask)) *a_result = TRUE; else *a_result = FALSE; @@ -383,8 +383,8 @@ ephyrHostXVAdaptorHasPutVideo(const EphyrHostXVAdaptor * a_this, Bool *a_result) Bool ephyrHostXVAdaptorHasGetVideo(const EphyrHostXVAdaptor * a_this, Bool *a_result) { - if ((((XvAdaptorInfo *) a_this)->type & (XvVideoMask | XvOutputMask)) == - (XvVideoMask | XvOutputMask)) + if ((((const XvAdaptorInfo *) a_this)->type & + (XvVideoMask | XvOutputMask)) == (XvVideoMask | XvOutputMask)) *a_result = TRUE; else *a_result = FALSE; @@ -396,8 +396,8 @@ ephyrHostXVAdaptorHasPutStill(const EphyrHostXVAdaptor * a_this, Bool *a_result) { EPHYR_RETURN_VAL_IF_FAIL(a_this && a_result, FALSE); - if ((((XvAdaptorInfo *) a_this)->type & (XvStillMask | XvInputMask)) == - (XvStillMask | XvInputMask)) + if ((((const XvAdaptorInfo *) a_this)->type & + (XvStillMask | XvInputMask)) == (XvStillMask | XvInputMask)) *a_result = TRUE; else *a_result = FALSE; @@ -409,8 +409,8 @@ ephyrHostXVAdaptorHasGetStill(const EphyrHostXVAdaptor * a_this, Bool *a_result) { EPHYR_RETURN_VAL_IF_FAIL(a_this && a_result, FALSE); - if ((((XvAdaptorInfo *) a_this)->type & (XvStillMask | XvOutputMask)) == - (XvStillMask | XvOutputMask)) + if ((((const XvAdaptorInfo *) a_this)->type & + (XvStillMask | XvOutputMask)) == (XvStillMask | XvOutputMask)) *a_result = TRUE; else *a_result = FALSE; @@ -422,8 +422,8 @@ ephyrHostXVAdaptorHasPutImage(const EphyrHostXVAdaptor * a_this, Bool *a_result) { EPHYR_RETURN_VAL_IF_FAIL(a_this && a_result, FALSE); - if ((((XvAdaptorInfo *) a_this)->type & (XvImageMask | XvInputMask)) == - (XvImageMask | XvInputMask)) + if ((((const XvAdaptorInfo *) a_this)->type & + (XvImageMask | XvInputMask)) == (XvImageMask | XvInputMask)) *a_result = TRUE; else *a_result = FALSE; diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c index adacac949..9a1dd7d94 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c @@ -45,7 +45,7 @@ extern KdPointerDriver LinuxEvdevMouseDriver; extern KdKeyboardDriver LinuxEvdevKeyboardDriver; #endif -void processScreenArg(char *screen_size, char *parent_id); +void processScreenArg(const char *screen_size, char *parent_id); void InitCard(char *name) @@ -134,7 +134,7 @@ ddxUseMsg(void) } void -processScreenArg(char *screen_size, char *parent_id) +processScreenArg(const char *screen_size, char *parent_id) { KdCardInfo *card; diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c index f2b458d90..5071289d9 100644 --- a/xorg-server/hw/kdrive/ephyr/hostx.c +++ b/xorg-server/hw/kdrive/ephyr/hostx.c @@ -215,7 +215,7 @@ hostx_set_screen_number(EphyrScreenInfo screen, int number) } void -hostx_set_win_title(EphyrScreenInfo screen, char *extra_text) +hostx_set_win_title(EphyrScreenInfo screen, const char *extra_text) { struct EphyrHostScreen *host_screen = host_screen_from_screen_info(screen); diff --git a/xorg-server/hw/kdrive/ephyr/hostx.h b/xorg-server/hw/kdrive/ephyr/hostx.h index 38b7b3768..f47297c5d 100644 --- a/xorg-server/hw/kdrive/ephyr/hostx.h +++ b/xorg-server/hw/kdrive/ephyr/hostx.h @@ -171,7 +171,7 @@ void hostx_set_screen_number(EphyrScreenInfo screen, int number); void - hostx_set_win_title(EphyrScreenInfo screen, char *extra_text); + hostx_set_win_title(EphyrScreenInfo screen, const char *extra_text); int hostx_get_depth(void); diff --git a/xorg-server/hw/kdrive/ephyr/os.c b/xorg-server/hw/kdrive/ephyr/os.c index a2a705dd9..56b52d143 100644 --- a/xorg-server/hw/kdrive/ephyr/os.c +++ b/xorg-server/hw/kdrive/ephyr/os.c @@ -28,7 +28,7 @@ #endif #include "ephyr.h" -extern void processScreenArg(char *screen_size, char *parent_id); +extern void processScreenArg(const char *screen_size, char *parent_id); static int EphyrInit(void) |