Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5c14033
Fix stand alone compiling
dustin84 Jan 23, 2017
6ae6a6d
Build WiFi module
dustin84 Jan 23, 2017
42027f6
Adjust Makefile
dustin84 Jan 24, 2017
023333c
proc: Remove verifiedbootstate flag from /proc/cmdline
kerneltoast Oct 21, 2016
6ee8099
input: synaptics: s3320: fix gestures
engstk Dec 8, 2016
e166df2
mmc: move to a SCHED_FIFO thread
Jan 20, 2016
cefd1cf
msm: vidc: disable CPU L2 cache PC during video sessions
Nov 3, 2015
b7a7d9f
kgsl: convert some workqueues to use kthreads
Jul 26, 2016
e0458b5
sound: msm: qdsp6v2: optimize for size
TheCrazyLex Jul 9, 2016
6de2c31
input: synaptics: s1302: Stop keypad when touchscreen is in use
kerneltoast Jul 17, 2016
942c8d5
misc: fpc1020: Ignore home key presses when touchscreen is in use
kerneltoast Jul 17, 2016
deddfed
misc: fpc1020: Set fingerprintd priority to max when screen is off
kerneltoast Nov 29, 2016
d7277c3
input: synaptics: s3320: Actually set BTN_TOOL_FINGER keybit
kerneltoast Jul 17, 2016
b76b228
input: synaptics: s3320: Silence log spam
kerneltoast Aug 6, 2016
f6c1c01
msm: mpm: disable debugging
franciscofranco Mar 17, 2015
847c77c
drivers: mdss: disable OP backlight remap fuckery
franciscofranco Nov 25, 2016
cc9583b
UPSTREAM: lz4: fix wrong compress buffer size for 64-bits
Jan 20, 2016
c9adad9
power: bq27541: Don't queue work onto a specific CPU
kerneltoast Aug 17, 2016
348dc9a
arch: Unbreak mrproper/clean
Apr 17, 2015
d139bbd
qpnp-smbcharger: Enable USB fast charging up to 900 mA
andip71 Sep 9, 2016
6048081
mmc/core: disable crc to improve performance
andip71 Sep 16, 2014
3b14bdb
input: synaptics: s3320: Make interrupt handling more robust
kerneltoast Jul 14, 2016
8758bdb
cpuidle: don't disable cpuidle when entering suspend
Sep 21, 2016
f658de2
gpio_keys: call oem_check_force_dump_key() later
arter97 Oct 23, 2016
8b6df43
qcom: mpm: use interruptible wait to reduce load avg
franciscofranco Aug 25, 2016
8249292
msm: Use interruptible wait to not affect load average
franciscofranco Nov 24, 2015
b43a418
qcom: msm-core: uninterruptible wait - you can kiss my arse goodbye
franciscofranco Dec 12, 2015
85adcb0
Makefile: add -mcpu=cortex-a57 -mtune=cortex-a57 \ flag
dustin84 Feb 14, 2017
050c27d
Revert "Build WiFi module" to use stock module instead
dustin84 Feb 17, 2017
ae5b15f
wlan: quick hack for module to load
flar2 Jun 24, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
CFLAGS_MODULE =
AFLAGS_MODULE =
LDFLAGS_MODULE =
LDFLAGS_MODULE = --strip-debug
CFLAGS_KERNEL =
AFLAGS_KERNEL =
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
Expand Down Expand Up @@ -406,6 +406,7 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
-mcpu=cortex-a57 -mtune=cortex-a57 \
-std=gnu89

KBUILD_AFLAGS_KERNEL :=
Expand Down Expand Up @@ -626,7 +627,7 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
else
KBUILD_CFLAGS += -O2
KBUILD_CFLAGS += -O2 $(call cc-disable-warning,maybe-uninitialized,)
endif

# Tell gcc to never replace conditional load with a non-conditional one
Expand Down
Empty file added arch/arm64/boot/qcom/Makefile
Empty file.
3 changes: 0 additions & 3 deletions drivers/base/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <linux/suspend.h>
#include <trace/events/power.h>
#include <linux/cpufreq.h>
#include <linux/cpuidle.h>
#include <linux/timer.h>
#include <linux/wakeup_reason.h>

Expand Down Expand Up @@ -606,7 +605,6 @@ void dpm_resume_noirq(pm_message_t state)
async_synchronize_full();
dpm_show_time(starttime, state, "noirq");
resume_device_irqs();
cpuidle_resume();
trace_suspend_resume(TPS("dpm_resume_noirq"), state.event, false);
}

Expand Down Expand Up @@ -1142,7 +1140,6 @@ int dpm_suspend_noirq(pm_message_t state)
int error = 0;

trace_suspend_resume(TPS("dpm_suspend_noirq"), state.event, true);
cpuidle_pause();
suspend_device_irqs();
mutex_lock(&dpm_list_mtx);
pm_transition = state;
Expand Down
6 changes: 3 additions & 3 deletions drivers/gpu/msm/adreno_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -2096,7 +2096,7 @@ static void _dispatcher_power_down(struct adreno_device *adreno_dev)
mutex_unlock(&device->mutex);
}

static void adreno_dispatcher_work(struct work_struct *work)
static void adreno_dispatcher_work(struct kthread_work *work)
{
struct adreno_dispatcher *dispatcher =
container_of(work, struct adreno_dispatcher, work);
Expand Down Expand Up @@ -2156,7 +2156,7 @@ void adreno_dispatcher_schedule(struct kgsl_device *device)
struct adreno_device *adreno_dev = ADRENO_DEVICE(device);
struct adreno_dispatcher *dispatcher = &adreno_dev->dispatcher;

kgsl_schedule_work(&dispatcher->work);
queue_kthread_work(&kgsl_driver.worker, &dispatcher->work);
}

/**
Expand Down Expand Up @@ -2438,7 +2438,7 @@ int adreno_dispatcher_init(struct adreno_device *adreno_dev)
setup_timer(&dispatcher->fault_timer, adreno_dispatcher_fault_timer,
(unsigned long) adreno_dev);

INIT_WORK(&dispatcher->work, adreno_dispatcher_work);
init_kthread_work(&dispatcher->work, adreno_dispatcher_work);

init_completion(&dispatcher->idle_gate);
complete_all(&dispatcher->idle_gate);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/msm/adreno_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct adreno_dispatcher {
atomic_t fault;
struct plist_head pending;
spinlock_t plist_lock;
struct work_struct work;
struct kthread_work work;
struct kobject kobj;
struct completion idle_gate;
unsigned int disp_preempt_fair_sched;
Expand Down
14 changes: 14 additions & 0 deletions drivers/gpu/msm/kgsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4036,6 +4036,8 @@ static void kgsl_core_exit(void)
static int __init kgsl_core_init(void)
{
int result = 0;
struct sched_param param = { .sched_priority = 2 };

/* alloc major and minor device numbers */
result = alloc_chrdev_region(&kgsl_driver.major, 0, KGSL_DEVICE_MAX,
"kgsl");
Expand Down Expand Up @@ -4101,6 +4103,18 @@ static int __init kgsl_core_init(void)
kgsl_driver.mem_workqueue = alloc_workqueue("kgsl-mementry",
WQ_UNBOUND | WQ_MEM_RECLAIM, 0);

init_kthread_worker(&kgsl_driver.worker);

kgsl_driver.worker_thread = kthread_run(kthread_worker_fn,
&kgsl_driver.worker, "kgsl_worker_thread");

if (IS_ERR(kgsl_driver.worker_thread)) {
pr_err("unable to start kgsl thread\n");
goto err;
}

sched_setscheduler(kgsl_driver.worker_thread, SCHED_FIFO, &param);

kgsl_events_init();

result = kgsl_cmdbatch_init();
Expand Down
6 changes: 5 additions & 1 deletion drivers/gpu/msm/kgsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/dma-attrs.h>
#include <linux/uaccess.h>
#include <asm/cacheflush.h>
#include <linux/kthread.h>

/* The number of memstore arrays limits the number of contexts allowed.
* If more contexts are needed, update multiple for MEMSTORE_SIZE
Expand Down Expand Up @@ -132,6 +133,9 @@ struct kgsl_driver {
unsigned int full_cache_threshold;
struct workqueue_struct *workqueue;
struct workqueue_struct *mem_workqueue;

struct kthread_worker worker;
struct task_struct *worker_thread;
};

extern struct kgsl_driver kgsl_driver;
Expand Down Expand Up @@ -275,7 +279,7 @@ struct kgsl_event {
void *priv;
struct list_head node;
unsigned int created;
struct work_struct work;
struct kthread_work work;
int result;
struct kgsl_event_group *group;
};
Expand Down
8 changes: 4 additions & 4 deletions drivers/gpu/msm/kgsl_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static inline void signal_event(struct kgsl_device *device,
{
list_del(&event->node);
event->result = result;
queue_work(device->events_wq, &event->work);
queue_kthread_work(&kgsl_driver.worker, &event->work);
}

/**
Expand All @@ -42,7 +42,7 @@ static inline void signal_event(struct kgsl_device *device,
* Each event callback has its own work struct and is run on a event specific
* workqeuue. This is the worker that queues up the event callback function.
*/
static void _kgsl_event_worker(struct work_struct *work)
static void _kgsl_event_worker(struct kthread_work *work)
{
struct kgsl_event *event = container_of(work, struct kgsl_event, work);
int id = KGSL_CONTEXT_ID(event->context);
Expand Down Expand Up @@ -282,7 +282,7 @@ int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group,
event->created = jiffies;
event->group = group;

INIT_WORK(&event->work, _kgsl_event_worker);
init_kthread_work(&event->work, _kgsl_event_worker);

trace_kgsl_register_event(KGSL_CONTEXT_ID(context), timestamp, func);

Expand All @@ -297,7 +297,7 @@ int kgsl_add_event(struct kgsl_device *device, struct kgsl_event_group *group,

if (timestamp_cmp(retired, timestamp) >= 0) {
event->result = KGSL_EVENT_RETIRED;
queue_work(device->events_wq, &event->work);
queue_kthread_work(&kgsl_driver.worker, &event->work);
spin_unlock(&group->lock);
return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/keyboard/gpio_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,15 @@ static void gpio_keys_gpio_report_event(struct gpio_button_data *bdata)

state = (__gpio_get_value(button->gpio) ? 1 : 0) ^ button->active_low;

oem_check_force_dump_key(button->code,state);

if (type == EV_ABS) {
if (state)
input_event(input, type, button->code, button->value);
} else {
input_event(input, type, button->code, !!state);
}
input_sync(input);

oem_check_force_dump_key(button->code,state);
}

static void gpio_keys_gpio_work_func(struct work_struct *work)
Expand Down
13 changes: 10 additions & 3 deletions drivers/input/misc/fpc1020_tee.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ static DEVICE_ATTR(irq, S_IRUSR | S_IWUSR, irq_get, irq_ack);
extern void int_touch(void);
extern struct completion key_cm;
extern bool virtual_key_enable;
extern bool s1302_is_keypad_stopped(void);

bool key_home_pressed = false;
EXPORT_SYMBOL(key_home_pressed);
Expand All @@ -289,12 +290,18 @@ static ssize_t report_home_set(struct device *dev,
{
struct fpc1020_data *fpc1020 = dev_get_drvdata(dev);
unsigned long time;
bool ignore_keypad;

if (s1302_is_keypad_stopped() || virtual_key_enable)
ignore_keypad = true;
else
ignore_keypad = false;

if(ignor_home_for_ESD)
return -EINVAL;
if (!strncmp(buf, "down", strlen("down")))
{
if(virtual_key_enable){
if(ignore_keypad){
key_home_pressed = true;
}else{
input_report_key(fpc1020->input_dev,
Expand All @@ -304,7 +311,7 @@ static ssize_t report_home_set(struct device *dev,
}
else if (!strncmp(buf, "up", strlen("up")))
{
if(virtual_key_enable){
if(ignore_keypad){
key_home_pressed = false;
}else{
input_report_key(fpc1020->input_dev,
Expand All @@ -314,7 +321,7 @@ static ssize_t report_home_set(struct device *dev,
}
else
return -EINVAL;
if(virtual_key_enable){
if(ignore_keypad){
if(!key_home_pressed){
reinit_completion(&key_cm);
time = wait_for_completion_timeout(&key_cm,msecs_to_jiffies(60));
Expand Down
85 changes: 83 additions & 2 deletions drivers/input/touchscreen/synaptics_driver_s1302.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ struct synaptics_ts_data {
char fw_name[TP_FW_NAME_MAX_LEN];
char fw_id[12];
char manu_name[12];

bool stop_keypad;
};

static int tc_hw_pwron(struct synaptics_ts_data *ts)
Expand Down Expand Up @@ -920,7 +922,7 @@ static void synaptics_ts_report(struct synaptics_ts_data *ts )
#elif (defined SUPPORT_VIRTUAL_KEY)
if (virtual_key_enable)
int_virtual_key(ts);
else
else if (!ts->stop_keypad)
int_key(ts);
#endif
}
Expand Down Expand Up @@ -2022,6 +2024,80 @@ static int choice_gpio_function(struct synaptics_ts_data *ts)
return ret;
}

bool s1302_is_keypad_stopped(void)
{
struct synaptics_ts_data *ts = tc_g;

return ts->stop_keypad;
}

static void synaptics_input_event(struct input_handle *handle,
unsigned int type, unsigned int code, int value)
{
struct synaptics_ts_data *ts = tc_g;

if (code != BTN_TOOL_FINGER)
return;

/* Disable capacitive keys when user's finger is on touchscreen */
ts->stop_keypad = value;
}

static int synaptics_input_connect(struct input_handler *handler,
struct input_dev *dev, const struct input_device_id *id)
{
struct input_handle *handle;
int ret;

handle = kzalloc(sizeof(*handle), GFP_KERNEL);
if (!handle)
return -ENOMEM;

handle->dev = dev;
handle->handler = handler;
handle->name = "s1302_handle";

ret = input_register_handle(handle);
if (ret)
goto err2;

ret = input_open_device(handle);
if (ret)
goto err1;

return 0;

err1:
input_unregister_handle(handle);
err2:
kfree(handle);
return ret;
}

static void synaptics_input_disconnect(struct input_handle *handle)
{
input_close_device(handle);
input_unregister_handle(handle);
kfree(handle);
}

static const struct input_device_id synaptics_input_ids[] = {
{
.flags = INPUT_DEVICE_ID_MATCH_KEYBIT,
.keybit = { [BIT_WORD(BTN_TOOL_FINGER)] =
BIT_MASK(BTN_TOOL_FINGER) },
},
{ },
};

static struct input_handler synaptics_input_handler = {
.event = synaptics_input_event,
.connect = synaptics_input_connect,
.disconnect = synaptics_input_disconnect,
.name = "syna_input_handler",
.id_table = synaptics_input_ids,
};

static int synaptics_ts_probe(struct i2c_client *client, const struct i2c_device_id *id)
{
#ifdef CONFIG_SYNAPTIC_RED
Expand Down Expand Up @@ -2086,7 +2162,7 @@ static int synaptics_ts_probe(struct i2c_client *client, const struct i2c_device
TPD_ERR("CURRENT_FIRMWARE_ID = 0x%x\n", CURRENT_FIRMWARE_ID);
sprintf(ts->fw_id,"0x%x",CURRENT_FIRMWARE_ID);

memset(ts->fw_name,TP_FW_NAME_MAX_LEN,0);
memset(ts->fw_name,0,TP_FW_NAME_MAX_LEN);
strcpy(ts->fw_name,"tp/fw_synaptics_touchkey.img");
TPD_DEBUG("synatpitcs_fw: fw_name = %s \n",ts->fw_name);

Expand Down Expand Up @@ -2155,6 +2231,11 @@ static int synaptics_ts_probe(struct i2c_client *client, const struct i2c_device
register_remote_device_s1302(premote_data);
}
#endif

ret = input_register_handler(&synaptics_input_handler);
if (ret)
TPD_ERR("%s: Failed to register input handler\n", __func__);

TPDTM_DMESG("synaptics_ts_probe s1302: normal end\n");
return 0;

Expand Down
Loading