Revert "init xv clone adaptor" 18/35118/1 accepted/tizen_common accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen tizen_3.0.2015.q2_common accepted/tizen/common/20150210.094628 accepted/tizen/common/20150210.094657 accepted/tizen/mobile/20150211.014821 accepted/tizen/tv/20150211.042426 accepted/tizen/wearable/20150211.014140 submit/tizen/20150209.103615 submit/tizen/20150209.103921
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 9 Feb 2015 10:14:34 +0000 (19:14 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 9 Feb 2015 10:19:03 +0000 (19:19 +0900)
This reverts commit 95d55fce35a217baf4455af3f072c8eac87e8242.

Change-Id: I509dbbfcf1e75b4d1c908eeae72d89bf8070958e

13 files changed:
src/Makefile.am
src/crtcconfig/sec_crtc.c
src/crtcconfig/sec_display.c
src/crtcconfig/sec_output.c
src/crtcconfig/sec_xberc.c
src/ipp/sec_wb.c
src/ipp/sec_wb.h
src/util/sec_util.h
src/xv/sec_video.c
src/xv/sec_video.h
src/xv/sec_video_clone.c [deleted file]
src/xv/sec_video_clone.h [deleted file]
src/xv/sec_video_virtual.c

index 3619035..baf6e33 100644 (file)
@@ -39,13 +39,12 @@ exynos_drv_la_SOURCES += \
        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
index 3e60271..dc487b4 100644 (file)
@@ -1913,6 +1913,10 @@ secCrtcApply(xf86CrtcPtr pCrtc)
                 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);
index 789178a..e3dc626 100644 (file)
@@ -1266,7 +1266,9 @@ secDisplaySetDispSetMode  (ScrnInfoPtr pScrn, SECDisplaySetMode set_mode)
 {
     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);
@@ -1313,7 +1315,7 @@ secDisplaySetDispSetMode  (ScrnInfoPtr pScrn, SECDisplaySetMode 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_ST12, 0, 0, (pSec->scanout)?TRUE:FALSE, wb_hz, TRUE);
+            pSec->wb_clone = secWbOpen (pScrn, FOURCC_SN12, 0, 0, (pSec->scanout)?TRUE:FALSE, wb_hz, TRUE);
             if (pSec->wb_clone)
             {
                 secWbAddNotifyFunc (pSec->wb_clone, WB_NOTI_CLOSED,
index 4d87a80..9614e3c 100644 (file)
@@ -681,11 +681,11 @@ SECOutputSetProperty(xf86OutputPtr output, Atom property,
     /* 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))
@@ -702,7 +702,13 @@ SECOutputSetProperty(xf86OutputPtr output, Atom property,
 
         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;
index bed2cc1..9af272c 100644 (file)
@@ -1230,7 +1230,7 @@ secXbercSetProperty (xf86OutputPtr output, Atom property, RRPropertyValuePtr val
     if (rr_property_atom != property)
     {
         _secXbercSetReturnProperty (value, "[Xberc]: Unrecognized property name.\n");
-        return FALSE;
+        return TRUE;
     }
 
     if (_secXbercParseArg (&argc, argv, value) == FALSE || argc < 1)
index f5ee61c..040b917 100644 (file)
@@ -75,9 +75,8 @@ enum
 
 enum
 {
-    STATUS_RUNNING,
-    STATUS_PAUSE,
-    STATUS_STOP,
+    STATUS_STARTED,
+    STATUS_STOPPED,
 };
 
 typedef struct _SECWbNotifyFuncInfo
@@ -150,7 +149,7 @@ static Atom atom_wb_rotate;
 static void _secWbQueue (SECWb *wb, int index);
 static Bool _secWbRegisterRotateHook (SECWb *wb, Bool hook);
 static void _secWbCloseDrmDstBuffer (SECWb *wb);
-static void _secWbCloseDrm (SECWb *wb, Bool pause);
+static void _secWbCloseDrm (SECWb *wb);
 
 static CARD32
 _secWbCountPrint (OsTimerPtr timer, CARD32 now, pointer arg)
@@ -254,11 +253,6 @@ _secWbLayerNotifyFunc (SECLayer *layer, int type, void *type_data, void *data)
     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);
@@ -486,10 +480,9 @@ secWbHandleIppEvent (int fd, unsigned int *buf_idx, void *data)
         wb->event_timer = NULL;
     }
 
-    if ((wb->status == STATUS_STOP) || (wb->status == STATUS_PAUSE))
+    if (wb->status == STATUS_STOPPED)
     {
-        XDBG_ERROR (MWB, "stop or pause. ignore a event. %p, (status:%d)\n",
-            data, wb->status);
+        XDBG_ERROR (MWB, "stopped. ignore a event. %p\n", data);
         return;
     }
 
@@ -732,7 +725,7 @@ _secWbOpenDrm (SECWb *wb)
 
 fail_to_open:
 
-    _secWbCloseDrm (wb, FALSE);
+    _secWbCloseDrm (wb);
 
     _secWbCloseDrmDstBuffer (wb);
 
@@ -740,7 +733,7 @@ fail_to_open:
 }
 
 static void
-_secWbCloseDrm (SECWb *wb, Bool pause)
+_secWbCloseDrm (SECWb *wb)
 {
     struct drm_exynos_ipp_cmd_ctrl ctrl;
     int i;
@@ -749,8 +742,7 @@ _secWbCloseDrm (SECWb *wb, Bool pause)
 
     XDBG_TRACE (MWB, "now_showing(%d) \n", wb->now_showing);
 
-    /* pause : remain displaying layer buffer */
-    if (wb->tv && !pause)
+    if (wb->tv)
     {
         secVideoTvDisconnect (wb->tv);
         wb->tv = NULL;
@@ -930,7 +922,7 @@ secWbIsRunning (void)
     if (!keep_wb)
         return FALSE;
 
-    return (keep_wb->status == STATUS_RUNNING) ? TRUE : FALSE;
+    return (keep_wb->status == STATUS_STARTED) ? TRUE : FALSE;
 }
 
 SECWb*
@@ -973,7 +965,7 @@ _secWbOpen (ScrnInfoPtr pScrn, unsigned int id, int width, int height,
 
     keep_wb->width = width;
     keep_wb->height = height;
-    keep_wb->status = STATUS_STOP;
+    keep_wb->status = STATUS_STOPPED;
 
     keep_wb->scanout = scanout;
     keep_wb->hz = (hz > 0) ? hz : 60;
@@ -1036,7 +1028,7 @@ _secWbStart (SECWb *wb, const char *func)
         return FALSE;
     }
 
-    if (wb->status == STATUS_RUNNING)
+    if (wb->status == STATUS_STARTED)
         return TRUE;
 
     if (!_secWbOpenDrm (wb))
@@ -1045,7 +1037,7 @@ _secWbStart (SECWb *wb, const char *func)
         return FALSE;
     }
 
-    wb->status = STATUS_RUNNING;
+    wb->status = STATUS_STARTED;
 
     _secWbCallNotifyFunc (wb, WB_NOTI_START, NULL);
 
@@ -1059,7 +1051,7 @@ _secWbStop (SECWb *wb, Bool close_buf,const char *func)
 {
     XDBG_RETURN_IF_FAIL (wb != NULL);
 
-    if ((wb->status == STATUS_STOP) || (wb->status == STATUS_PAUSE))
+    if (wb->status == STATUS_STOPPED)
     {
         if (wb->rotate_timer)
         {
@@ -1069,68 +1061,27 @@ _secWbStop (SECWb *wb, Bool close_buf,const char *func)
         return;
     }
 
-    _secWbCloseDrm (wb, FALSE);
+    _secWbCloseDrm (wb);
 
     if (close_buf)
         _secWbCloseDrmDstBuffer (wb);
     else
         _secWbClearDrmDstBuffer (wb);
 
-    wb->status = STATUS_STOP;
+    wb->status = STATUS_STOPPED;
 
     _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_RUNNING, FALSE);
+    XDBG_RETURN_VAL_IF_FAIL (wb->status != STATUS_STARTED, 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);
@@ -1190,7 +1141,7 @@ secWbSetRotate (SECWb *wb, int rotate)
 
     wb->rotate = rotate;
 
-    if (wb->status == STATUS_RUNNING)
+    if (wb->status == STATUS_STARTED)
     {
         SECModePtr pSecMode = (SECModePtr) SECPTR (wb->pScrn)->pSecMode;
 
@@ -1225,7 +1176,7 @@ secWbSetTvout (SECWb *wb, Bool enable)
 
     wb->tvout = enable;
 
-    if (wb->status == STATUS_RUNNING)
+    if (wb->status == STATUS_STARTED)
     {
         secWbStop (wb, FALSE);
 
@@ -1256,7 +1207,7 @@ secWbSetSecure (SECWb *wb, Bool secure)
 
     wb->secure = secure;
 
-    if (wb->status == STATUS_RUNNING)
+    if (wb->status == STATUS_STARTED)
     {
         secWbStop (wb, TRUE);
 
index 4a3b6f0..38b9752 100644 (file)
@@ -43,7 +43,6 @@ typedef enum
     WB_NOTI_START,
     WB_NOTI_IPP_EVENT,
     WB_NOTI_IPP_EVENT_DONE,
-    WB_NOTI_PAUSE,
     WB_NOTI_STOP,
     WB_NOTI_CLOSED,
 } SECWbNotify;
@@ -90,9 +89,6 @@ Bool   secWbIsOpened  (void);
 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);
 
index 07dd493..72f9fbe 100644 (file)
@@ -70,7 +70,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #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))
 
index 38925b3..ec6ae92 100644 (file)
@@ -62,7 +62,6 @@
 #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"
@@ -1454,7 +1453,7 @@ _secVideoStreamOff (SECPortPrivPtr pPort)
 
     pPort->need_start_wb = FALSE;
     pPort->skip_tvout = FALSE;
-    pPort->usr_output = OUTPUT_LCD|OUTPUT_EXT|OUTPUT_FULL;
+    pPort->usr_output = OUTPUT_LCD|OUTPUT_EXT;
     pPort->outbuf_cvting = -1;
     pPort->drawing = 0;
     pPort->tv_prev_time = 0;
@@ -1486,7 +1485,7 @@ _secVideoCalculateSize (SECPortPrivPtr pPort)
     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;
@@ -2452,7 +2451,12 @@ SECVideoSetPortAttribute (ScrnInfoPtr pScrn,
     }
     else if (attribute == _portAtom (PAA_OUTPUT))
     {
-        pPort->usr_output = OUTPUT_LCD|OUTPUT_EXT|OUTPUT_FULL;
+        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;
 
         XDBG_DEBUG (MVDO, "output (%d) \n", (int) value);
 
@@ -2969,7 +2973,7 @@ secVideoSetupImageVideo (ScreenPtr pScreen)
     {
         pAdaptor->pPortPrivates[i].ptr = &pPort[i];
         pPort[i].index = i;
-        pPort[i].usr_output = OUTPUT_LCD|OUTPUT_EXT|OUTPUT_FULL;
+        pPort[i].usr_output = OUTPUT_LCD|OUTPUT_EXT;
         pPort[i].outbuf_cvting = -1;
     }
 
@@ -3060,16 +3064,6 @@ Bool secVideoInit (ScreenPtr pScreen)
         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);
index 94a116c..54888bc 100644 (file)
@@ -30,7 +30,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef SEC_VIDEO_H
 #define SEC_VIDEO_H
 
-#define ADAPTOR_NUM  4
+#define ADAPTOR_NUM  3
 
 enum
 {
diff --git a/src/xv/sec_video_clone.c b/src/xv/sec_video_clone.c
deleted file mode 100644 (file)
index 42f2357..0000000
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * 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;
-}
diff --git a/src/xv/sec_video_clone.h b/src/xv/sec_video_clone.h
deleted file mode 100644 (file)
index 43f19d5..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/**************************************************************************
-
-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
index ae92a53..87eed61 100644 (file)
@@ -1111,8 +1111,7 @@ _secVirtualStillCompositeExtLayers (SECPortPrivPtr pPort, int connector_type, Bo
     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)
         {
@@ -1137,13 +1136,12 @@ _secVirtualStillCompositeExtLayers (SECPortPrivPtr pPort, int connector_type, Bo
                 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);