From e1129ba35fea943ba9787088edd582826f247db8 Mon Sep 17 00:00:00 2001 From: Yong Ding Date: Fri, 29 Nov 2019 10:58:05 +0800 Subject: [PATCH 1/5] soc: qcom: hab: run the dispatcher's tasklet w/ high priority HAB uses tasklets as the bottom half to receive message from the remote side. Even when the whole system is overloaded, HAB clients (e.g., audio, display, gfx) still expect low latency for good user experience. So here, tasklet_hi_schedule() is used. Change-Id: I0b8ed281f090e9c251eb62fe5e78900ea2e9dc8d Signed-off-by: Yong Ding --- drivers/soc/qcom/hab/hab_ghs.c | 2 +- drivers/soc/qcom/hab/hab_qvm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/hab/hab_ghs.c b/drivers/soc/qcom/hab/hab_ghs.c index f479d69b9e38..57c4513c4058 100644 --- a/drivers/soc/qcom/hab/hab_ghs.c +++ b/drivers/soc/qcom/hab/hab_ghs.c @@ -86,7 +86,7 @@ static void ghs_irq_handler(void *cookie) (struct ghs_vdev *) (pchan ? pchan->hyp_data : NULL); if (dev) - tasklet_schedule(&dev->task); + tasklet_hi_schedule(&dev->task); } static int get_dt_name_idx(int vmid_base, int mmid, diff --git a/drivers/soc/qcom/hab/hab_qvm.c b/drivers/soc/qcom/hab/hab_qvm.c index f9f72fc1beb4..6f1cf26334f2 100644 --- a/drivers/soc/qcom/hab/hab_qvm.c +++ b/drivers/soc/qcom/hab/hab_qvm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -80,7 +80,7 @@ static irqreturn_t shm_irq_handler(int irq, void *_pchan) if (status & 0xffff) {/*source bitmask indicator*/ rc = IRQ_HANDLED; - tasklet_schedule(&dev->task); + tasklet_hi_schedule(&dev->task); } } return rc; From 4bbb2def1d83ff9fb09691bce13cac509f97e0e6 Mon Sep 17 00:00:00 2001 From: Lily Li Date: Mon, 26 Aug 2019 14:45:42 +0800 Subject: [PATCH 2/5] media: v4l2loopback: fix for dereferenced error Found the code hasn't check whether some var is NULL before using it in v4l2loopback. Fix those issues. Change-Id: I559ed8c0978cf478ed713761b7bc7e3b21c09ff4 Signed-off-by: Lily Li --- drivers/media/v4l2loopback-master/v4l2loopback.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2loopback-master/v4l2loopback.c b/drivers/media/v4l2loopback-master/v4l2loopback.c index f8ade92b9407..b6e7f6a2a768 100644 --- a/drivers/media/v4l2loopback-master/v4l2loopback.c +++ b/drivers/media/v4l2loopback-master/v4l2loopback.c @@ -483,6 +483,8 @@ static ssize_t attr_store_format(struct device *cd, struct v4l2_loopback_device *dev = v4l2loopback_cd2dev(cd); int fps_num = 0, fps_den = 1; + if (!dev) + return -EINVAL; /* only fps changing is supported */ if (sscanf(buf, "@%d/%d", &fps_num, &fps_den) > 0) { struct v4l2_fract f = { @@ -490,7 +492,6 @@ static ssize_t attr_store_format(struct device *cd, .denominator = fps_num }; int err = 0; - err = set_timeperframe(dev, &f); if (err < 0) return err; @@ -671,7 +672,7 @@ static inline void unset_flags(struct v4l2l_buffer *buffer) static void vidioc_fill_name(char *buf, int len, int nr) { if (card_label[nr] != NULL) - snprintf(buf, len, card_label[nr]); + snprintf(buf, len, "%s\n", card_label[nr]); else snprintf(buf, len, "Dummy video device (0x%04X)", nr); } @@ -1909,7 +1910,7 @@ static int v4l2_loopback_mmap(struct file *file, struct vm_area_struct *vma) page = (void *)vmalloc_to_page((void *)addr); - if (vm_insert_page(vma, start, page) < 0) + if (!page || vm_insert_page(vma, start, page) < 0) return -EAGAIN; start += PAGE_SIZE; From efea876c059d224e56bded4eec3b7864a0a2e0d7 Mon Sep 17 00:00:00 2001 From: Manoj Prabhu B Date: Wed, 4 Dec 2019 11:36:50 +0530 Subject: [PATCH 3/5] diag: Update diag logging mask definitions Extend build mask range and define logging levels for SSID range 0. Update event and log mask last ids to support latest log mask ranges. Change-Id: Iaca4f1d10e8e61db42c5dafab33c772c026b3845 Signed-off-by: Manoj Prabhu B --- include/linux/diagchar.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/linux/diagchar.h b/include/linux/diagchar.h index 1046fb4611bf..d931f9690e2f 100644 --- a/include/linux/diagchar.h +++ b/include/linux/diagchar.h @@ -145,10 +145,10 @@ the appropriate macros. */ /* This needs to be modified manually now, when we add a new RANGE of SSIDs to the msg_mask_tbl */ #define MSG_MASK_TBL_CNT 26 -#define APPS_EVENT_LAST_ID 0xCB4 +#define APPS_EVENT_LAST_ID 0xCB7 #define MSG_SSID_0 0 -#define MSG_SSID_0_LAST 130 +#define MSG_SSID_0_LAST 131 #define MSG_SSID_1 500 #define MSG_SSID_1_LAST 506 #define MSG_SSID_2 1000 @@ -341,13 +341,15 @@ static const uint32_t msg_bld_masks_0[] = { MSG_LVL_MED, MSG_LVL_HIGH, MSG_LVL_LOW, - MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL, + MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR | + MSG_LVL_FATAL, MSG_LVL_HIGH, MSG_LVL_LOW, MSG_LVL_MED, MSG_LVL_MED, MSG_LVL_HIGH, - MSG_LVL_HIGH + MSG_LVL_HIGH, + MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR }; static const uint32_t msg_bld_masks_1[] = { @@ -911,7 +913,7 @@ static const uint32_t msg_bld_masks_25[] = { /* LOG CODES */ static const uint32_t log_code_last_tbl[] = { 0x0, /* EQUIP ID 0 */ - 0x1CB2, /* EQUIP ID 1 */ + 0x1CC0, /* EQUIP ID 1 */ 0x0, /* EQUIP ID 2 */ 0x0, /* EQUIP ID 3 */ 0x4910, /* EQUIP ID 4 */ From e445e5b99ea5647dfa3b8fc57fdf4b308b523789 Mon Sep 17 00:00:00 2001 From: Chao Bi Date: Tue, 3 Dec 2019 12:16:19 +0800 Subject: [PATCH 4/5] ARM: dts: msm: remove CARVEOUT ION for msm8996 ivi multi-gvm vplatform CARVEOUT ION memory is not needed for lv gvm in multi-mode. Change-Id: Id45da104da170680c0daa607c29b4ca6ca6f5779 Signed-off-by: Chao Bi --- .../dts/qcom/vplatform-lfv-msm8996-ivi-lv-mt.dts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/qcom/vplatform-lfv-msm8996-ivi-lv-mt.dts b/arch/arm/boot/dts/qcom/vplatform-lfv-msm8996-ivi-lv-mt.dts index 8b2373e2c079..c9e0bc54e469 100644 --- a/arch/arm/boot/dts/qcom/vplatform-lfv-msm8996-ivi-lv-mt.dts +++ b/arch/arm/boot/dts/qcom/vplatform-lfv-msm8996-ivi-lv-mt.dts @@ -1,4 +1,4 @@ -/* Copyright (c) 2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -83,14 +83,18 @@ }; }; +&ion { + /delete-node/ qcom,ion-heap@25; + + system_heap: qcom,ion-heap@25 { + reg = <25>; + qcom,ion-heap-type = "SYSTEM"; + }; +}; + &reserved_memory { pmem_shared: pmem_shared_region@d0000000 { reg = <0 0xd0000000 0 0x20000000>; label = "pmem_shared_mem"; }; - - ion_system: ion_system_region@100000000 { - reg = <0x1 0x60000000 0 0x10000000>; - label = "ion_system_mem"; - }; }; From a4fda0058007867361bd0df664ad9a449660110c Mon Sep 17 00:00:00 2001 From: E V Ravi Date: Mon, 4 Nov 2019 17:38:32 +0530 Subject: [PATCH 5/5] msm: ais: fix camif_cfg programming Fixed Camera configuration register. Register expects width and height starting from 0 while it was programmed starting from 1. This fixes CAMIF erorrs we experience as the programmed size is always 1 more pixel and line. Change-Id: I73f1f5040820b71d317c317f8f5c6e3ff19db6e6 Signed-off-by: E V Ravi --- drivers/media/platform/msm/ais/isp/msm_isp47.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/msm/ais/isp/msm_isp47.c b/drivers/media/platform/msm/ais/isp/msm_isp47.c index 1ddcab3ed331..666f1916eaa9 100644 --- a/drivers/media/platform/msm/ais/isp/msm_isp47.c +++ b/drivers/media/platform/msm/ais/isp/msm_isp47.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1323,8 +1323,8 @@ void msm_vfe47_cfg_camif(struct vfe_device *vfe_dev, first_line = camif_cfg->first_line; last_line = camif_cfg->last_line; - msm_camera_io_w((camif_cfg->lines_per_frame) << 16 | - (camif_cfg->pixels_per_line), vfe_dev->vfe_base + 0x484); + msm_camera_io_w((camif_cfg->lines_per_frame - 1) << 16 | + (camif_cfg->pixels_per_line - 1), vfe_dev->vfe_base + 0x484); if (bus_sub_en) { val = msm_camera_io_r(vfe_dev->vfe_base + 0x47C); val &= 0xFFFFFFDF;