summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-02-04 09:44:45 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-02-04 09:44:45 -0500
commit497a287f07d3f2ea285e7e459d4b7cd5ce27178f (patch)
tree987582d993da06a55161d3de3891eeaa531e4ec1 /src/lib/ecore_drm
parent1486c7053ac09ee1b3ca6e884eeea424198a2f0e (diff)
This should not have been pushed. Revert
Revert "ecore-drm: Add API functions for rotation support" This reverts commit b8ceaf0d403ce640ed6a485a59a3bd5a7b06a260.
Diffstat (limited to 'src/lib/ecore_drm')
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c132
1 files changed, 0 insertions, 132 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 3c27387..1ac8f9a 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -648,11 +648,7 @@ _ecore_drm_output_create(Ecore_Drm_Device *dev, drmModeRes *res, drmModeConnecto
648 (conn->count_modes == 0) ? ", built-in" : ""); 648 (conn->count_modes == 0) ? ", built-in" : "");
649 } 649 }
650 650
651<<<<<<< 94082f54e8ce7d47402ea5d8d57e3871f8fa98a4
652 _ecore_drm_output_planes_get(output); 651 _ecore_drm_output_planes_get(output);
653=======
654 _ecore_drm_output_planes_find(output);
655>>>>>>> ecore-drm: Add API functions for rotation support
656 652
657 return output; 653 return output;
658 654
@@ -889,100 +885,6 @@ _ecore_drm_output_render_disable(Ecore_Drm_Output *output)
889 ecore_drm_output_dpms_set(output, DRM_MODE_DPMS_OFF); 885 ecore_drm_output_dpms_set(output, DRM_MODE_DPMS_OFF);
890} 886}
891 887
892<<<<<<< 94082f54e8ce7d47402ea5d8d57e3871f8fa98a4
893=======
894#if 0
895static void
896_ecore_drm_output_planes_get(Ecore_Drm_Device *dev)
897{
898 drmModePlaneRes *pres;
899 unsigned int i = 0, j = 0;
900 int k = 0;
901
902 pres = drmModeGetPlaneResources(dev->drm.fd);
903 if (!pres) return;
904
905 for (; i < pres->count_planes; i++)
906 {
907 drmModePlane *plane;
908 drmModeObjectPropertiesPtr props;
909 int type = -1;
910
911 plane = drmModeGetPlane(dev->drm.fd, pres->planes[i]);
912 if (!plane) continue;
913
914 props = drmModeObjectGetProperties(dev->drm.fd, plane->plane_id,
915 DRM_MODE_OBJECT_PLANE);
916 if (!props) goto free_plane;
917
918 DBG("Plane %u Properties:", plane->plane_id);
919
920 for (j = 0; type == -1 && j < props->count_props; j++)
921 {
922 drmModePropertyPtr prop;
923
924 prop = drmModeGetProperty(dev->drm.fd, props->props[j]);
925 if (!prop) continue;
926
927 if (!strcmp(prop->name, "type"))
928 type = props->prop_values[j];
929
930 drmModeFreeProperty(prop);
931 }
932
933 DBG("\tFormats:");
934 for (j = 0; j < plane->count_formats; j++)
935 DBG("\t\t%4.4s", (char *)&plane->formats[j]);
936
937 for (j = 0; j < props->count_props; j++ )
938 {
939 drmModePropertyPtr prop;
940
941 prop = drmModeGetProperty(dev->drm.fd, props->props[j]);
942 if (!prop) continue;
943
944 DBG("\tProperty Name: %s", prop->name);
945
946 if (prop->flags & DRM_MODE_PROP_RANGE)
947 {
948 DBG("\t\tRange Property");
949 for (k = 0; k < prop->count_values; k++)
950 DBG("\t\t\t%"PRIu64, prop->values[k]);
951 }
952 if (prop->flags & DRM_MODE_PROP_ENUM)
953 {
954 DBG("\t\tEnum Property");
955 for (k = 0; k < prop->count_enums; k++)
956 DBG("\t\t\t%s=%llu", prop->enums[k].name,
957 prop->enums[k].value);
958 }
959 if (prop->flags & DRM_MODE_PROP_BITMASK)
960 {
961 DBG("\t\tBitmask Property");
962 for (k = 0; k < prop->count_enums; k++)
963 DBG("\t\t\t%s=0x%llx", prop->enums[k].name,
964 (1LL << prop->enums[k].value));
965 }
966
967 DBG("\t\tValue: %"PRIu64, props->prop_values[j]);
968
969 drmModeFreeProperty(prop);
970 }
971
972 DBG("\tCurrent Crtc: %d", plane->crtc_id);
973 DBG("\tPossible Crtcs: 0x%08x", plane->possible_crtcs);
974
975 drmModeFreeObjectProperties(props);
976
977free_plane:
978 drmModeFreePlane(plane);
979 }
980
981 drmModeFreePlaneResources(pres);
982}
983#endif
984
985>>>>>>> ecore-drm: Add API functions for rotation support
986/* public functions */ 888/* public functions */
987 889
988/** 890/**
@@ -1055,12 +957,6 @@ next:
1055 drmModeFreeConnector(conn); 957 drmModeFreeConnector(conn);
1056 } 958 }
1057 959
1058<<<<<<< 94082f54e8ce7d47402ea5d8d57e3871f8fa98a4
1059=======
1060 /* TODO: Planes */
1061 /* _ecore_drm_output_planes_get(dev); */
1062
1063>>>>>>> ecore-drm: Add API functions for rotation support
1064 ret = EINA_TRUE; 960 ret = EINA_TRUE;
1065 if (eina_list_count(dev->outputs) < 1) 961 if (eina_list_count(dev->outputs) < 1)
1066 ret = EINA_FALSE; 962 ret = EINA_FALSE;
@@ -1590,7 +1486,6 @@ ecore_drm_output_mode_set(Ecore_Drm_Output *output, Ecore_Drm_Output_Mode *mode,
1590 return ret; 1486 return ret;
1591} 1487}
1592 1488
1593<<<<<<< 94082f54e8ce7d47402ea5d8d57e3871f8fa98a4
1594EAPI unsigned int 1489EAPI unsigned int
1595ecore_drm_output_supported_rotations_get(Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type) 1490ecore_drm_output_supported_rotations_get(Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type)
1596{ 1491{
@@ -1610,8 +1505,6 @@ ecore_drm_output_supported_rotations_get(Ecore_Drm_Output *output, Ecore_Drm_Pla
1610 return rot; 1505 return rot;
1611} 1506}
1612 1507
1613=======
1614>>>>>>> ecore-drm: Add API functions for rotation support
1615EAPI Eina_Bool 1508EAPI Eina_Bool
1616ecore_drm_output_rotation_set(Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type, unsigned int rotation) 1509ecore_drm_output_rotation_set(Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type, unsigned int rotation)
1617{ 1510{
@@ -1634,33 +1527,8 @@ ecore_drm_output_rotation_set(Ecore_Drm_Output *output, Ecore_Drm_Plane_Type typ
1634 DRM_MODE_OBJECT_PLANE, 1527 DRM_MODE_OBJECT_PLANE,
1635 output->rotation_prop_id, 1528 output->rotation_prop_id,
1636 plane->rotation_map[ffs(rotation)]); 1529 plane->rotation_map[ffs(rotation)]);
1637<<<<<<< 94082f54e8ce7d47402ea5d8d57e3871f8fa98a4
1638 break; 1530 break;
1639=======
1640>>>>>>> ecore-drm: Add API functions for rotation support
1641 } 1531 }
1642 1532
1643 return EINA_TRUE; 1533 return EINA_TRUE;
1644} 1534}
1645<<<<<<< 94082f54e8ce7d47402ea5d8d57e3871f8fa98a4
1646=======
1647
1648EAPI unsigned int
1649ecore_drm_output_supported_rotations_get(Ecore_Drm_Output *output, Ecore_Drm_Plane_Type type)
1650{
1651 Ecore_Drm_Plane *plane;
1652 Eina_List *l;
1653 unsigned int rot = -1;
1654
1655 EINA_SAFETY_ON_NULL_RETURN_VAL(output, rot);
1656
1657 EINA_LIST_FOREACH(output->planes, l, plane)
1658 {
1659 if (plane->type != type) continue;
1660 rot = plane->supported_rotations;
1661 break;
1662 }
1663
1664 return rot;
1665}
1666>>>>>>> ecore-drm: Add API functions for rotation support