Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
Ifdef cf6f23c changes
Browse files Browse the repository at this point in the history
This fixes Sammy kernels
  • Loading branch information
JustArchi committed Nov 22, 2014
1 parent 3dfe939 commit 4c30367
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/video/samsung/s3cfb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,20 @@ static ssize_t vsync_event_show(struct device *dev,
struct s3cfb_global *fbdev[1];
fbdev[0] = fbfimd->fbdev[0];

#ifdef CONFIG_ARCHIKERNEL_TARGET_SYSTEM_AOSP
return snprintf(buf, PAGE_SIZE, "%llu",
#else
return snprintf(buf, PAGE_SIZE, "VSYNC=%llu",
#endif
((fbdev[0] != 0) ?
ktime_to_ns(fbdev[0]->vsync_info.timestamp) : 0));
}

#ifdef CONFIG_ARCHIKERNEL_TARGET_SYSTEM_AOSP
static DEVICE_ATTR(vsync_time, S_IRUGO, vsync_event_show, NULL);
#else
static DEVICE_ATTR(vsync_event, 0444, vsync_event_show, NULL);
#endif

#if defined(CONFIG_FB_S5P_VSYNC_THREAD)
static int s3cfb_wait_for_vsync_thread(void *data)
Expand All @@ -434,8 +442,13 @@ static int s3cfb_wait_for_vsync_thread(void *data)
fbdev->vsync_info.timestamp) &&
fbdev->vsync_info.active);

#ifdef CONFIG_ARCHIKERNEL_TARGET_SYSTEM_AOSP
sysfs_notify(&fbdev->dev->kobj,
NULL, "vsync_time");
#else
sysfs_notify(&fbdev->fb[pdata->default_win]->dev->kobj,
NULL, "vsync_event");
#endif
}

return 0;
Expand Down Expand Up @@ -1288,8 +1301,13 @@ static int s3cfb_probe(struct platform_device *pdev)
if (ret < 0)
dev_err(fbdev[0]->dev, "failed to add sysfs entries\n");

#ifdef CONFIG_ARCHIKERNEL_TARGET_SYSTEM_AOSP
ret = device_create_file(fbdev[i]->dev,
&dev_attr_vsync_time);
#else
ret = device_create_file(fbdev[i]->fb[pdata->default_win]->dev,
&dev_attr_vsync_event);
#endif
if (ret < 0)
dev_err(fbdev[0]->dev, "failed to add sysfs entries\n");

Expand Down

0 comments on commit 4c30367

Please sign in to comment.