xv/sec_video_tvout.c \
xv/sec_video_virtual.c \
xv/sec_video_display.c \
+ xv/sec_video_clone.c \
xv/sec_video.c
AM_CFLAGS += -I@top_srcdir@/src/xv
# util
exynos_drv_la_SOURCES += \
- util/sec_util.c
+ util/sec_util.c
AM_CFLAGS += -I@top_srcdir@/src/util
# debug
continue;
pOutputPriv = pOutput->driver_private;
-#if 1
- if (pOutputPriv->mode_output->modes)
- memcpy (&pSecMode->main_lcd_mode, pOutputPriv->mode_output->modes, sizeof(drmModeModeInfo));
-#endif
/* TODO :: soolim :: check this out */
secOutputDpmsSet(pOutput, DPMSModeOn);
{
SECPtr pSec = SECPTR (pScrn);
SECModePtr pSecMode = pSec->pSecMode;
-#ifdef NO_CRTC_MODE
- return TRUE;
-#endif
+
if (pSecMode->set_mode == set_mode)
{
XDBG_INFO (MDISP, "set_mode(%d) is already set\n", set_mode);
XDBG_TRACE (MWB, "wb_hz(%d) vrefresh(%d)\n", pSec->wb_hz, pSecMode->ext_connector_mode.vrefresh);
- pSec->wb_clone = secWbOpen (pScrn, FOURCC_SN12, 0, 0, (pSec->scanout)?TRUE:FALSE, wb_hz, TRUE);
+ pSec->wb_clone = secWbOpen (pScrn, FOURCC_ST12, 0, 0, (pSec->scanout)?TRUE:FALSE, wb_hz, TRUE);
if (pSec->wb_clone)
{
secWbAddNotifyFunc (pSec->wb_clone, WB_NOTI_CLOSED,
/* set the hidden properties : features for sec debugging*/
/* TODO : xberc can works on only LVDS????? */
#ifdef NO_CRTC_MODE
- if ((pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_HDMIA) ||
- (pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_VIRTUAL) ||
- (pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_LVDS))
+ if ((pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_HDMIA) ||
+ (pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_VIRTUAL) ||
+ (pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_LVDS))
#else
- if (pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_LVDS)
+ if (pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_LVDS)
#endif
{
if (secPropSetLvdsFunc (output, property, value))
if (secXbercSetProperty (output, property, value))
return TRUE;
- }
- /* set the hidden properties : features for driver specific funtions */
- if (pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
- pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_HDMIB ||
- pOutputPriv->mode_output->connector_type == DRM_MODE_CONNECTOR_VIRTUAL)
- {
/* set the property for the display mode */
if (secPropSetDisplayMode(output, property, value))
return TRUE;
if (rr_property_atom != property)
{
_secXbercSetReturnProperty (value, "[Xberc]: Unrecognized property name.\n");
- return TRUE;
+ return FALSE;
}
if (_secXbercParseArg (&argc, argv, value) == FALSE || argc < 1)
enum
{
- STATUS_STARTED,
- STATUS_STOPPED,
+ STATUS_RUNNING,
+ STATUS_PAUSE,
+ STATUS_STOP,
};
typedef struct _SECWbNotifyFuncInfo
static void _secWbQueue (SECWb *wb, int index);
static Bool _secWbRegisterRotateHook (SECWb *wb, Bool hook);
static void _secWbCloseDrmDstBuffer (SECWb *wb);
-static void _secWbCloseDrm (SECWb *wb);
+static void _secWbCloseDrm (SECWb *wb, Bool pause);
static CARD32
_secWbCountPrint (OsTimerPtr timer, CARD32 now, pointer arg)
XDBG_RETURN_IF_FAIL (wb != NULL);
XDBG_RETURN_IF_FAIL (VBUF_IS_VALID (vbuf));
+ if (wb->status == STATUS_PAUSE) {
+ XDBG_WARNING (MWB, "pause status. return.\n");
+ return;
+ }
+
if (wb->wait_show >= 0 && wb->dst_buf[wb->wait_show] != vbuf)
XDBG_WARNING (MWB, "wait_show(%d,%p) != showing_vbuf(%p). \n",
wb->wait_show, wb->dst_buf[wb->wait_show], vbuf);
wb->event_timer = NULL;
}
- if (wb->status == STATUS_STOPPED)
+ if ((wb->status == STATUS_STOP) || (wb->status == STATUS_PAUSE))
{
- XDBG_ERROR (MWB, "stopped. ignore a event. %p\n", data);
+ XDBG_ERROR (MWB, "stop or pause. ignore a event. %p, (status:%d)\n",
+ data, wb->status);
return;
}
fail_to_open:
- _secWbCloseDrm (wb);
+ _secWbCloseDrm (wb, FALSE);
_secWbCloseDrmDstBuffer (wb);
}
static void
-_secWbCloseDrm (SECWb *wb)
+_secWbCloseDrm (SECWb *wb, Bool pause)
{
struct drm_exynos_ipp_cmd_ctrl ctrl;
int i;
XDBG_TRACE (MWB, "now_showing(%d) \n", wb->now_showing);
- if (wb->tv)
+ /* pause : remain displaying layer buffer */
+ if (wb->tv && !pause)
{
secVideoTvDisconnect (wb->tv);
wb->tv = NULL;
if (!keep_wb)
return FALSE;
- return (keep_wb->status == STATUS_STARTED) ? TRUE : FALSE;
+ return (keep_wb->status == STATUS_RUNNING) ? TRUE : FALSE;
}
SECWb*
keep_wb->width = width;
keep_wb->height = height;
- keep_wb->status = STATUS_STOPPED;
+ keep_wb->status = STATUS_STOP;
keep_wb->scanout = scanout;
keep_wb->hz = (hz > 0) ? hz : 60;
return FALSE;
}
- if (wb->status == STATUS_STARTED)
+ if (wb->status == STATUS_RUNNING)
return TRUE;
if (!_secWbOpenDrm (wb))
return FALSE;
}
- wb->status = STATUS_STARTED;
+ wb->status = STATUS_RUNNING;
_secWbCallNotifyFunc (wb, WB_NOTI_START, NULL);
{
XDBG_RETURN_IF_FAIL (wb != NULL);
- if (wb->status == STATUS_STOPPED)
+ if ((wb->status == STATUS_STOP) || (wb->status == STATUS_PAUSE))
{
if (wb->rotate_timer)
{
return;
}
- _secWbCloseDrm (wb);
+ _secWbCloseDrm (wb, FALSE);
if (close_buf)
_secWbCloseDrmDstBuffer (wb);
else
_secWbClearDrmDstBuffer (wb);
- wb->status = STATUS_STOPPED;
+ wb->status = STATUS_STOP;
_secWbCallNotifyFunc (wb, WB_NOTI_STOP, NULL);
XDBG_TRACE (MWB, "stop: %s \n", func);
}
+void
+secWbPause (SECWb *wb)
+{
+ XDBG_RETURN_IF_FAIL (wb != NULL);
+
+ if ((wb->status == STATUS_STOP) || (wb->status == STATUS_PAUSE))
+ {
+ if (wb->rotate_timer)
+ {
+ TimerFree (wb->rotate_timer);
+ wb->rotate_timer = NULL;
+ }
+ return;
+ }
+
+ _secWbCloseDrm (wb, TRUE);
+
+ _secWbCloseDrmDstBuffer (wb);
+
+ wb->status = STATUS_PAUSE;
+
+ _secWbCallNotifyFunc (wb, WB_NOTI_PAUSE, NULL);
+
+ XDBG_TRACE (MWB, "pause: %s, wb(%p)\n", __func__, wb);
+}
+
+void
+secWbResume (SECWb *wb)
+{
+ wb->wait_show = -1;
+ wb->now_showing = -1;
+
+ if (!secWbStart (wb))
+ {
+ XDBG_ERROR(MWB, "wb(%p) start fail.%s\n", wb, __func__);
+ secWbClose (wb);
+ wb = NULL;
+ }
+ XDBG_TRACE (MWB, "start: %s, wb(%p)\n", __func__, wb);
+}
+
Bool
secWbSetBuffer (SECWb *wb, SECVideoBuf **vbufs, int bufnum)
{
int i;
XDBG_RETURN_VAL_IF_FAIL (wb != NULL, FALSE);
- XDBG_RETURN_VAL_IF_FAIL (wb->status != STATUS_STARTED, FALSE);
+ XDBG_RETURN_VAL_IF_FAIL (wb->status != STATUS_RUNNING, FALSE);
XDBG_RETURN_VAL_IF_FAIL (vbufs != NULL, FALSE);
XDBG_RETURN_VAL_IF_FAIL (wb->buf_num <= bufnum, FALSE);
XDBG_RETURN_VAL_IF_FAIL (bufnum <= WB_BUF_MAX, FALSE);
wb->rotate = rotate;
- if (wb->status == STATUS_STARTED)
+ if (wb->status == STATUS_RUNNING)
{
SECModePtr pSecMode = (SECModePtr) SECPTR (wb->pScrn)->pSecMode;
wb->tvout = enable;
- if (wb->status == STATUS_STARTED)
+ if (wb->status == STATUS_RUNNING)
{
secWbStop (wb, FALSE);
wb->secure = secure;
- if (wb->status == STATUS_STARTED)
+ if (wb->status == STATUS_RUNNING)
{
secWbStop (wb, TRUE);
WB_NOTI_START,
WB_NOTI_IPP_EVENT,
WB_NOTI_IPP_EVENT_DONE,
+ WB_NOTI_PAUSE,
WB_NOTI_STOP,
WB_NOTI_CLOSED,
} SECWbNotify;
Bool secWbIsRunning (void);
void secWbDestroy (void);
+void secWbPause (SECWb *wb);
+void secWbResume (SECWb *wb);
+
unsigned int secWbGetPropID (void);
void secWbHandleIppEvent (int fd, unsigned int *buf_idx, void *data);
#define MEXAH XDBG_M('E','X','A','H')
#define MG2D XDBG_M('G','2','D',0)
#define MDOUT XDBG_M('D','O','T',0)
+#define MCLON XDBG_M('C','L','O','N')
#define _XID(win) ((unsigned int)(((WindowPtr)win)->drawable.id))
#include "sec_wb.h"
#include "sec_video_virtual.h"
#include "sec_video_display.h"
+#include "sec_video_clone.h"
#include "sec_video_tvout.h"
#include "sec_video_fourcc.h"
#include "sec_converter.h"
pPort->need_start_wb = FALSE;
pPort->skip_tvout = FALSE;
- pPort->usr_output = OUTPUT_LCD|OUTPUT_EXT;
+ pPort->usr_output = OUTPUT_LCD|OUTPUT_EXT|OUTPUT_FULL;
pPort->outbuf_cvting = -1;
pPort->drawing = 0;
pPort->tv_prev_time = 0;
src_prop.height = pPort->d.height;
src_prop.crop = pPort->d.src;
- dst_prop.id = FOURCC_RGB32;
+ dst_prop.id = FOURCC_RGB32;
if (pPort->drawing == ON_PIXMAP || pPort->drawing == ON_WINDOW)
{
dst_prop.width = pPort->d.pDraw->width;
}
else if (attribute == _portAtom (PAA_OUTPUT))
{
- if (value == OUTPUT_MODE_TVOUT)
- pPort->usr_output = OUTPUT_LCD|OUTPUT_EXT|OUTPUT_FULL;
- else if (value == OUTPUT_MODE_EXT_ONLY)
- pPort->usr_output = OUTPUT_EXT|OUTPUT_FULL;
- else
- pPort->usr_output = OUTPUT_LCD|OUTPUT_EXT;
+ pPort->usr_output = OUTPUT_LCD|OUTPUT_EXT|OUTPUT_FULL;
XDBG_DEBUG (MVDO, "output (%d) \n", (int) value);
{
pAdaptor->pPortPrivates[i].ptr = &pPort[i];
pPort[i].index = i;
- pPort[i].usr_output = OUTPUT_LCD|OUTPUT_EXT;
+ pPort[i].usr_output = OUTPUT_LCD|OUTPUT_EXT|OUTPUT_FULL;
pPort[i].outbuf_cvting = -1;
}
return FALSE;
}
+ pVideo->pAdaptor[3] = secVideoSetupCloneVideo (pScreen);
+ if (!pVideo->pAdaptor[3])
+ {
+ free (pVideo->pAdaptor[2]);
+ free (pVideo->pAdaptor[1]);
+ free (pVideo->pAdaptor[0]);
+ free (pVideo);
+ return FALSE;
+ }
+
xf86XVScreenInit (pScreen, pVideo->pAdaptor, ADAPTOR_NUM);
SECVideoReplacePutImageFunc (pScreen);
#ifndef SEC_VIDEO_H
#define SEC_VIDEO_H
-#define ADAPTOR_NUM 3
+#define ADAPTOR_NUM 4
enum
{
--- /dev/null
+/*
+ * xserver-xorg-video-exynos
+ *
+ * Copyright 2014 - 2015 Samsung Electronics co., Ltd. All Rights Reserved.
+ *
+ * Contact: Junkyeong Kim <jk0430.kim@samsung.com>
+ *
+ * Permission to use, copy, modify, distribute and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the names of the authors and/or copyright holders
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. The authors and
+ * copyright holders make no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without any express
+ * or implied warranty.
+ *
+ * THE AUTHORS AND COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO
+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <string.h>
+#include <errno.h>
+#include <sys/time.h>
+#include <sys/ioctl.h>
+
+#include <pixman.h>
+#include <X11/Xatom.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvproto.h>
+#include <fourcc.h>
+
+#include <xf86xv.h>
+
+#include "sec.h"
+#include "sec_util.h"
+#include "sec_video_clone.h"
+#include "sec_video_fourcc.h"
+#include "sec_layer.h"
+
+#include "fimg2d.h"
+
+#define SEC_MAX_PORT 1
+#define LAYER_BUF_CNT 3
+#define OUTBUF_NUM 3
+
+static XF86VideoEncodingRec dummy_encoding[] =
+{
+ { 0, "XV_IMAGE", -1, -1, { 1, 1 } },
+ { 1, "XV_IMAGE", 4224, 4224, { 1, 1 } },
+};
+
+static XF86VideoFormatRec formats[] =
+{
+ { 16, TrueColor },
+ { 24, TrueColor },
+ { 32, TrueColor },
+};
+
+static XF86AttributeRec attributes[] =
+{
+ { 0, 0, 1, "_USER_WM_PORT_ATTRIBUTE_CLONE" },
+};
+
+typedef enum
+{
+ PAA_MIN,
+ PAA_FREEZE,
+ PAA_ROTATE,
+ PAA_MAX
+} SECPortAttrAtom;
+
+static struct
+{
+ SECPortAttrAtom paa;
+ const char *name;
+ Atom atom;
+} atoms[] =
+{
+ { PAA_FREEZE, "_USER_WM_PORT_ATTRIBUTE_FREEZE", None },
+ { PAA_ROTATE, "_USER_WM_PORT_ATTRIBUTE_ROTATE", None },
+};
+
+/* SEC port information structure */
+typedef struct
+{
+ int index;
+
+ /* attributes */
+ Bool freeze;
+ int degree;
+ ScrnInfoPtr pScrn;
+
+ /* writeback */
+ SECWb *wb;
+
+ struct xorg_list link;
+} SECPortPriv, *SECPortPrivPtr;
+
+typedef struct _SECCloneVideoResource
+{
+ XID id;
+ RESTYPE type;
+
+ SECPortPrivPtr pPort;
+ ScrnInfoPtr pScrn;
+} SECCloneVideoResource;
+
+#define NUM_FORMATS (sizeof(formats) / sizeof(formats[0]))
+#define NUM_ATTRIBUTES (sizeof(attributes) / sizeof(attributes[0]))
+#define NUM_ATOMS (sizeof(atoms) / sizeof(atoms[0]))
+
+static Atom
+_portAtom (SECPortAttrAtom paa)
+{
+ int i;
+
+ XDBG_RETURN_VAL_IF_FAIL (paa > PAA_MIN && paa < PAA_MAX, None);
+
+ for (i = 0; i < NUM_ATOMS; i++)
+ {
+ if (paa == atoms[i].paa)
+ {
+ if (atoms[i].atom == None)
+ atoms[i].atom = MakeAtom (atoms[i].name,
+ strlen (atoms[i].name), TRUE);
+
+ return atoms[i].atom;
+ }
+ }
+
+ XDBG_ERROR (MCLON, "Error: Unknown Port Attribute Name!\n");
+
+ return None;
+}
+
+static int
+SECCloneVideoGetPortAttribute (ScrnInfoPtr pScrn,
+ Atom attribute,
+ INT32 *value,
+ pointer data)
+{
+ SECPortPrivPtr pPort = (SECPortPrivPtr) data;
+
+ if (attribute == _portAtom (PAA_FREEZE)) {
+ *value = pPort->freeze;
+ return Success;
+ } else if (attribute == _portAtom (PAA_ROTATE)) {
+ *value = pPort->degree;
+ return Success;
+ }
+
+ return BadMatch;
+}
+
+static int
+SECCloneVideoSetPortAttribute (ScrnInfoPtr pScrn,
+ Atom attribute,
+ INT32 value,
+ pointer data)
+{
+ SECPortPrivPtr pPort = (SECPortPrivPtr) data;
+
+ if (attribute == _portAtom (PAA_FREEZE)) {
+ if (!pPort->wb) {
+ XDBG_ERROR (MCLON, "do PutVideo first\n");
+ return BadMatch;
+ }
+ if (pPort->freeze == value) {
+ XDBG_WARNING (MCLON, "same freeze cmd(%d)\n", (int)value);
+ return Success;
+ }
+
+ pPort->freeze = value;
+ XDBG_DEBUG (MCLON, "freeze(%d)\n", (int)value);
+
+ if (value == 1)
+ secWbPause(pPort->wb);
+ else
+ secWbResume(pPort->wb);
+ return Success;
+ } else if (attribute == _portAtom (PAA_ROTATE)) {
+ if (pPort->degree != value) {
+ pPort->degree = value;
+ if (pPort->wb) {
+ XDBG_DEBUG (MCLON, "rotate(%d)\n", (int)value);
+ secWbSetRotate (pPort->wb, pPort->degree);
+ }
+ }
+
+ return Success;
+ }
+
+ return BadMatch;
+}
+
+static int
+SECCloneVideoPutVideo (ScrnInfoPtr pScrn,
+ short vid_x, short vid_y, short drw_x, short drw_y,
+ short vid_w, short vid_h, short drw_w, short drw_h,
+ RegionPtr clipBoxes, pointer data,
+ DrawablePtr pDraw)
+{
+ SECPortPrivPtr pPort = (SECPortPrivPtr) data;
+ SECPtr pSec = SECPTR (pScrn);
+ SECModePtr pSecMode = pSec->pSecMode;
+ int wb_hz;
+
+ XDBG_DEBUG (MCLON, "SECCloneVideoPutVideo start\n");
+
+ if (pDraw->type != DRAWABLE_WINDOW) {
+ XDBG_ERROR (MCLON, "Fail : pDraw->type is not DRAWABLE_WINDOW.\n");
+ return BadRequest;
+ }
+
+ pPort->pScrn = pScrn;
+
+ if (pPort->wb) {
+ XDBG_ERROR (MCLON, "Fail : wb(%p) already exists.\n", pPort->wb);
+ return BadRequest;
+ }
+
+ if (secWbIsOpened()) {
+ XDBG_ERROR (MCLON, "Fail : wb(%d) already opened.\n", secWbGet());
+ return BadRequest;
+ }
+
+ wb_hz = (pSec->wb_hz > 0)?pSec->wb_hz:pSecMode->ext_connector_mode.vrefresh;
+ XDBG_TRACE (MCLON, "wb_hz(%d) vrefresh(%d)\n",
+ pSec->wb_hz, pSecMode->ext_connector_mode.vrefresh);
+
+ pPort->wb = secWbOpen(pPort->pScrn, FOURCC_ST12,
+ pDraw->width, pDraw->height,
+ pSec->scanout, wb_hz, FALSE);//(pPort->degree)?FALSE:TRUE);
+ XDBG_RETURN_VAL_IF_FAIL(pPort->wb != NULL, BadAlloc);
+
+ if (pPort->wb) {
+ secWbSetRotate (pPort->wb, pSecMode->rotate);//pPort->degree);
+ XDBG_DEBUG (MCLON, "pSecMode->rotate : %d\n", pSecMode->rotate);
+ secWbSetTvout (pPort->wb, TRUE);
+
+ XDBG_TRACE(MCLON, "wb(%p) start.\n", pPort->wb);
+ if (!secWbStart (pPort->wb)) {
+ XDBG_ERROR(MCLON, "wb(%p) start fail.\n", pPort->wb);
+ secWbClose (pSec->wb_clone);
+ pPort->wb = NULL;
+ return BadDrawable;
+ }
+ }
+
+ if (!secWbIsRunning()) {
+ XDBG_WARNING (MCLON, "wb is stopped.\n");
+ return BadRequest;
+ }
+
+ XDBG_TRACE (MCLON, "wb(%p), running(%d).\n", pPort->wb, secWbIsRunning());
+
+ return Success;
+}
+
+static void
+SECCloneVideoStop (ScrnInfoPtr pScrn, pointer data, Bool exit)
+{
+ SECPortPrivPtr pPort = (SECPortPrivPtr) data;
+
+ XDBG_TRACE (MCLON, "exit (%d) \n", exit);
+
+ if (!exit)
+ return;
+
+ if (pPort->wb) {
+ secWbClose(pPort->wb);
+ pPort->wb = NULL;
+ XDBG_TRACE (MCLON, "excuted\n");
+ }
+ pPort->freeze = 0;
+ pPort->degree = 0;
+}
+
+static void
+SECCloneVideoQueryBestSize (ScrnInfoPtr pScrn,
+ Bool motion,
+ short vid_w, short vid_h,
+ short dst_w, short dst_h,
+ unsigned int *p_w, unsigned int *p_h,
+ pointer data)
+{
+ if (p_w)
+ *p_w = (unsigned int)dst_w & (~0x1);
+ if (p_h)
+ *p_h = (unsigned int)dst_h & (~0x1);
+}
+
+XF86VideoAdaptorPtr
+secVideoSetupCloneVideo (ScreenPtr pScreen)
+{
+ XF86VideoAdaptorPtr pAdaptor;
+ SECPortPrivPtr pPort;
+ int i;
+
+ pAdaptor = calloc (1, sizeof (XF86VideoAdaptorRec) +
+ (sizeof (DevUnion) + sizeof (SECPortPriv)) * SEC_MAX_PORT);
+ if (!pAdaptor)
+ return NULL;
+
+ dummy_encoding[0].width = pScreen->width;
+ dummy_encoding[0].height = pScreen->height;
+
+ pAdaptor->type = XvWindowMask | XvInputMask | XvVideoMask;
+ pAdaptor->flags = VIDEO_OVERLAID_IMAGES;
+ pAdaptor->name = "SEC Clone Video";
+ pAdaptor->nEncodings = sizeof (dummy_encoding) / sizeof (XF86VideoEncodingRec);
+ pAdaptor->pEncodings = dummy_encoding;
+ pAdaptor->nFormats = NUM_FORMATS;
+ pAdaptor->pFormats = formats;
+ pAdaptor->nPorts = SEC_MAX_PORT;
+ pAdaptor->pPortPrivates = (DevUnion*)(&pAdaptor[1]);
+
+ pPort = (SECPortPrivPtr) (&pAdaptor->pPortPrivates[SEC_MAX_PORT]);
+
+ for (i = 0; i < SEC_MAX_PORT; i++)
+ {
+ pAdaptor->pPortPrivates[i].ptr = &pPort[i];
+ pPort[i].index = i;
+ pPort[i].freeze = 0;
+ pPort[i].degree = 0;
+ }
+
+ pAdaptor->nAttributes = NUM_ATTRIBUTES;
+ pAdaptor->pAttributes = attributes;
+
+ pAdaptor->GetPortAttribute = SECCloneVideoGetPortAttribute;
+ pAdaptor->SetPortAttribute = SECCloneVideoSetPortAttribute;
+ pAdaptor->PutVideo = SECCloneVideoPutVideo;
+ pAdaptor->StopVideo = SECCloneVideoStop;
+ pAdaptor->QueryBestSize = SECCloneVideoQueryBestSize;
+
+ return pAdaptor;
+}
--- /dev/null
+/**************************************************************************
+
+xserver-xorg-video-exynos
+
+Copyright 2014 - 2015 Samsung Electronics co., Ltd. All Rights Reserved.
+
+Contact: Junkyeong Kim <jk0430.kim@samsung.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+#ifndef __SEC_VIDEO_CLONE_H__
+#define __SEC_VIDEO_CLONE_H__
+
+/* setup clone adaptor */
+XF86VideoAdaptorPtr secVideoSetupCloneVideo (ScreenPtr pScreen);
+
+#endif
\ No newline at end of file
if (!complete)
{
/* check if operation in process*/
- if (pPort->wait_rgb_convert) goto convert_ipp_still;
+ if (pPort->wait_rgb_convert)
+ goto convert_ipp_still;
if (lower_layer)
{
comp = TRUE;
}
}
- } else
- {
- if (pPort->capture_dstbuf)
- dst_buf = pPort->capture_dstbuf;
- pPort->wait_rgb_convert = FALSE;
- }
+ }
+ else
+ {
+ if (pPort->capture_dstbuf)
+ dst_buf = pPort->capture_dstbuf;
+ pPort->wait_rgb_convert = FALSE;
+ }
pix_buf = _secVirtualVideoGetDrawableBuffer (pPort);
XDBG_GOTO_IF_FAIL (pix_buf != NULL, done_ipp_still);