mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
Merge android11-5.4.61+ (9c7cbdf) into msm-5.4
* refs/heads/tmp-9c7cbdf: ANDROID: ABI: add symbols of drm_atomic_helper_setup_commit to unisoc ANDROID: ABI: update allowed list for galaxy UPSTREAM: HID: core: Correctly handle ReportSize being zero UPSTREAM: HID: core: Sanitize event code and type when mapping input FROMLIST: scripts: merge_config: add strict mode to fail upon any redefinition Change-Id: I9ae5aa15a3bcef589ca072743ed5713bf0d0cacb Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This commit is contained in:
commit
b70099d409
10 changed files with 1610 additions and 1730 deletions
|
|
@ -1 +1 @@
|
|||
LTS_5.4.61_559c23e691b8
|
||||
LTS_5.4.61_9c7cbdf8b4cf
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -336,6 +336,7 @@
|
|||
cfg80211_scan_done
|
||||
cfg80211_sched_scan_results
|
||||
cfg80211_sched_scan_stopped
|
||||
cfg80211_sched_scan_stopped_rtnl
|
||||
cfg80211_unlink_bss
|
||||
cfg80211_unregister_wdev
|
||||
cfg80211_vendor_cmd_reply
|
||||
|
|
@ -1386,6 +1387,7 @@
|
|||
krealloc
|
||||
kset_create_and_add
|
||||
kset_unregister
|
||||
ksize
|
||||
kstat
|
||||
kstrdup
|
||||
kstrdup_quotable
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@
|
|||
drm_atomic_helper_plane_destroy_state
|
||||
drm_atomic_helper_plane_duplicate_state
|
||||
drm_atomic_helper_plane_reset
|
||||
drm_atomic_helper_setup_commit
|
||||
drm_compat_ioctl
|
||||
drm_dbg
|
||||
drm_dev_alloc
|
||||
|
|
@ -1049,6 +1050,7 @@
|
|||
|
||||
# required by mmc_hsq.ko
|
||||
mmc_cqe_request_done
|
||||
mmc_send_tuning
|
||||
|
||||
# required by musb_hdrc.ko
|
||||
device_wakeup_enable
|
||||
|
|
@ -2493,11 +2495,13 @@
|
|||
__arm_smccc_smc
|
||||
|
||||
# required by mali_gondul.ko
|
||||
__arch_clear_user
|
||||
bpf_trace_run5
|
||||
ktime_get_raw
|
||||
of_machine_is_compatible
|
||||
_totalram_pages
|
||||
trace_output_call
|
||||
__tracepoint_gpu_mem_total
|
||||
trace_print_array_seq
|
||||
trace_print_flags_seq
|
||||
vmf_insert_pfn_prot
|
||||
|
|
|
|||
|
|
@ -1597,6 +1597,17 @@ static void hid_output_field(const struct hid_device *hid,
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Compute the size of a report.
|
||||
*/
|
||||
static size_t hid_compute_report_size(struct hid_report *report)
|
||||
{
|
||||
if (report->size)
|
||||
return ((report->size - 1) >> 3) + 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a report. 'data' has to be allocated using
|
||||
* hid_alloc_report_buf() so that it has proper size.
|
||||
|
|
@ -1609,7 +1620,7 @@ void hid_output_report(struct hid_report *report, __u8 *data)
|
|||
if (report->id > 0)
|
||||
*data++ = report->id;
|
||||
|
||||
memset(data, 0, ((report->size - 1) >> 3) + 1);
|
||||
memset(data, 0, hid_compute_report_size(report));
|
||||
for (n = 0; n < report->maxfield; n++)
|
||||
hid_output_field(report->device, report->field[n], data);
|
||||
}
|
||||
|
|
@ -1739,7 +1750,7 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
|
|||
csize--;
|
||||
}
|
||||
|
||||
rsize = ((report->size - 1) >> 3) + 1;
|
||||
rsize = hid_compute_report_size(report);
|
||||
|
||||
if (report_enum->numbered && rsize >= HID_MAX_BUFFER_SIZE)
|
||||
rsize = HID_MAX_BUFFER_SIZE - 1;
|
||||
|
|
|
|||
|
|
@ -1132,6 +1132,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
|||
}
|
||||
|
||||
mapped:
|
||||
/* Mapping failed, bail out */
|
||||
if (!bit)
|
||||
return;
|
||||
|
||||
if (device->driver->input_mapped &&
|
||||
device->driver->input_mapped(device, hidinput, field, usage,
|
||||
&bit, &max) < 0) {
|
||||
|
|
|
|||
|
|
@ -864,6 +864,8 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
|
|||
code = BTN_0 + ((usage->hid - 1) & HID_USAGE);
|
||||
|
||||
hid_map_usage(hi, usage, bit, max, EV_KEY, code);
|
||||
if (!*bit)
|
||||
return -1;
|
||||
input_set_capability(hi->input, EV_KEY, code);
|
||||
return 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -959,34 +959,49 @@ static inline void hid_device_io_stop(struct hid_device *hid) {
|
|||
* @max: maximal valid usage->code to consider later (out parameter)
|
||||
* @type: input event type (EV_KEY, EV_REL, ...)
|
||||
* @c: code which corresponds to this usage and type
|
||||
*
|
||||
* The value pointed to by @bit will be set to NULL if either @type is
|
||||
* an unhandled event type, or if @c is out of range for @type. This
|
||||
* can be used as an error condition.
|
||||
*/
|
||||
static inline void hid_map_usage(struct hid_input *hidinput,
|
||||
struct hid_usage *usage, unsigned long **bit, int *max,
|
||||
__u8 type, __u16 c)
|
||||
__u8 type, unsigned int c)
|
||||
{
|
||||
struct input_dev *input = hidinput->input;
|
||||
|
||||
usage->type = type;
|
||||
usage->code = c;
|
||||
unsigned long *bmap = NULL;
|
||||
unsigned int limit = 0;
|
||||
|
||||
switch (type) {
|
||||
case EV_ABS:
|
||||
*bit = input->absbit;
|
||||
*max = ABS_MAX;
|
||||
bmap = input->absbit;
|
||||
limit = ABS_MAX;
|
||||
break;
|
||||
case EV_REL:
|
||||
*bit = input->relbit;
|
||||
*max = REL_MAX;
|
||||
bmap = input->relbit;
|
||||
limit = REL_MAX;
|
||||
break;
|
||||
case EV_KEY:
|
||||
*bit = input->keybit;
|
||||
*max = KEY_MAX;
|
||||
bmap = input->keybit;
|
||||
limit = KEY_MAX;
|
||||
break;
|
||||
case EV_LED:
|
||||
*bit = input->ledbit;
|
||||
*max = LED_MAX;
|
||||
bmap = input->ledbit;
|
||||
limit = LED_MAX;
|
||||
break;
|
||||
}
|
||||
|
||||
if (unlikely(c > limit || !bmap)) {
|
||||
pr_warn_ratelimited("%s: Invalid code %d type %d\n",
|
||||
input->name, c, type);
|
||||
*bit = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
usage->type = type;
|
||||
usage->code = c;
|
||||
*max = limit;
|
||||
*bit = bmap;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1000,7 +1015,8 @@ static inline void hid_map_usage_clear(struct hid_input *hidinput,
|
|||
__u8 type, __u16 c)
|
||||
{
|
||||
hid_map_usage(hidinput, usage, bit, max, type, c);
|
||||
clear_bit(c, *bit);
|
||||
if (*bit)
|
||||
clear_bit(usage->code, *bit);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ usage() {
|
|||
echo " -r list redundant entries when merging fragments"
|
||||
echo " -y make builtin have precedence over modules"
|
||||
echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead."
|
||||
echo " -s strict mode. Fail if the fragment redefines any value."
|
||||
echo
|
||||
echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_ environment variable."
|
||||
}
|
||||
|
|
@ -37,6 +38,7 @@ ALLTARGET=alldefconfig
|
|||
WARNREDUN=false
|
||||
BUILTIN=false
|
||||
OUTPUT=.
|
||||
STRICT=false
|
||||
CONFIG_PREFIX=${CONFIG_-CONFIG_}
|
||||
|
||||
while true; do
|
||||
|
|
@ -75,6 +77,11 @@ while true; do
|
|||
shift 2
|
||||
continue
|
||||
;;
|
||||
"-s")
|
||||
STRICT=true
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
|
|
@ -141,6 +148,9 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do
|
|||
echo Previous value: $PREV_VAL
|
||||
echo New value: $NEW_VAL
|
||||
echo
|
||||
if [ "$STRICT" = "true" ]; then
|
||||
STRICT_MODE_VIOLATED=true
|
||||
fi
|
||||
elif [ "$WARNREDUN" = "true" ]; then
|
||||
echo Value of $CFG is redundant by fragment $ORIG_MERGE_FILE:
|
||||
fi
|
||||
|
|
@ -153,6 +163,11 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do
|
|||
cat $MERGE_FILE >> $TMP_FILE
|
||||
done
|
||||
|
||||
if [ "$STRICT_MODE_VIOLATED" = "true" ]; then
|
||||
echo "The fragment redefined a value and strict mode had been passed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$RUNMAKE" = "false" ]; then
|
||||
cp -T -- "$TMP_FILE" "$KCONFIG_CONFIG"
|
||||
echo "#"
|
||||
|
|
|
|||
Loading…
Reference in a new issue