summaryrefslogtreecommitdiff
path: root/drivers/gpu/pvr/services4/srvkm/env/linux/sysfs.c
diff options
context:
space:
mode:
authorWengang Wu <wgw@motorola.com>2014-05-21 09:29:41 -0500
committerWengang Wu <wgw@motorola.com>2014-05-21 09:29:41 -0500
commit53a835f5057367679eb3db728bbdd427aab8aa8a (patch)
tree03e5bbde7d371e885d1c67210b2b0c9bb0130d40 /drivers/gpu/pvr/services4/srvkm/env/linux/sysfs.c
parent7489b569ffb64cdb998544405b6774bd43aab70b (diff)
downloadolio-linux-3.10-53a835f5057367679eb3db728bbdd427aab8aa8a.tar.xz
olio-linux-3.10-53a835f5057367679eb3db728bbdd427aab8aa8a.zip
IKXCLOCK-1501 Upgrade to TI SGX Android OpenGL 1.12@2701748
Initial codes of TI SGX DDK 1.12@2701748 Change-Id: I75a8f6521968346ea1b2ea9fa54817ba186442ce
Diffstat (limited to 'drivers/gpu/pvr/services4/srvkm/env/linux/sysfs.c')
-rw-r--r--drivers/gpu/pvr/services4/srvkm/env/linux/sysfs.c90
1 files changed, 0 insertions, 90 deletions
diff --git a/drivers/gpu/pvr/services4/srvkm/env/linux/sysfs.c b/drivers/gpu/pvr/services4/srvkm/env/linux/sysfs.c
deleted file mode 100644
index 63066ade212..00000000000
--- a/drivers/gpu/pvr/services4/srvkm/env/linux/sysfs.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2012 Texas Instruments, Inc
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <linux/kobject.h>
-#include <linux/sysfs.h>
-#include <linux/stat.h>
-#include <asm/page.h>
-#include <linux/slab.h>
-#include "services_headers.h"
-#include "pdump_km.h"
-#include "sysfs.h"
-
-/* sysfs structures */
-struct pvrsrv_attribute {
- struct attribute attr;
- int sgx_version;
- int sgx_revision;
-};
-
-static struct pvrsrv_attribute PVRSRVAttr = {
- .attr.name = "egl.cfg",
- .attr.mode = S_IRUGO,
- .sgx_version = SGXCORE,
- .sgx_revision = SGX_CORE_REV,
-};
-
-/* sysfs read function */
-static ssize_t PVRSRVEglCfgShow(struct kobject *kobj, struct attribute *attr,
- char *buffer) {
- struct pvrsrv_attribute *pvrsrv_attr;
-
- pvrsrv_attr = container_of(attr, struct pvrsrv_attribute, attr);
- return snprintf(buffer, PAGE_SIZE, "0 0 android\n0 1 POWERVR_SGX%d_%d",
- pvrsrv_attr->sgx_version, pvrsrv_attr->sgx_revision);
-}
-
-/* sysfs write function unsupported*/
-static ssize_t PVRSRVEglCfgStore(struct kobject *kobj, struct attribute *attr,
- const char *buffer, size_t size) {
- PVR_DPF((PVR_DBG_ERROR, "PVRSRVEglCfgStore not implemented"));
- return 0;
-}
-
-static struct attribute *pvrsrv_sysfs_attrs[] = {
- &PVRSRVAttr.attr,
- NULL
-};
-
-static const struct sysfs_ops pvrsrv_sysfs_ops = {
- .show = PVRSRVEglCfgShow,
- .store = PVRSRVEglCfgStore,
-};
-
-static struct kobj_type pvrsrv_ktype = {
- .sysfs_ops = &pvrsrv_sysfs_ops,
- .default_attrs = pvrsrv_sysfs_attrs,
-};
-
-/* create sysfs entry /sys/egl/egl.cfg to determine
- which gfx libraries to load */
-
-int PVRSRVCreateSysfsEntry(void)
-{
- struct kobject *egl_cfg_kobject;
- int r;
-
- egl_cfg_kobject = kzalloc(sizeof(*egl_cfg_kobject), GFP_KERNEL);
- r = kobject_init_and_add(egl_cfg_kobject, &pvrsrv_ktype, NULL, "egl");
-
- if (r) {
- PVR_DPF((PVR_DBG_ERROR,
- "Failed to create egl.cfg sysfs entry"));
- return PVRSRV_ERROR_INIT_FAILURE;
- }
-
- return PVRSRV_OK;
-}