Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 6c42d8c4 authored by Nathan Chancellor's avatar Nathan Chancellor
Browse files

Merge tag 'LA.UM.6.2.r1-10900-sdm660.0' into kernel.lnx.4.4.r27-rel



"LA.UM.6.2.r1-10900-sdm660.0"

* tag 'LA.UM.6.2.r1-10900-sdm660.0':
  msm: vidc: Increase minimum input buffer count for HEVC decode
  msm: ais: Fix out-of-bounds read in string class name
  netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets
  drm/msm: check HDMI HFVSDB block before adding formats
  msm: camera: sensor: Add support for front aux sensor
  fscrypt: lock mutex before checking for bounce page pool
  ASoC: wcd934x-dsp-cntl: initialize local char array val
  net: ipc_router: Initialize the sockaddr in recvmsg() handler
  msm: camera: Fix for Possible information leak issue
  nsfs: mark dentry with DCACHE_RCUACCESS
  BACKPORT: futex: Prevent overflow by strengthen input validation
  net: memset smsg to avoid the padding data
  drivers: qcom: lpm-stats: Fix undefined access error
  ASoC: msm: qdsp6v2: Fix rtac memory unmap issue in ASM driver
  drm/msm: Clear the mode private flags before setting
  drm/msm: Clear HDMI VSDB and VCDB info across hotplug
  drm/msm: refactor Y420CMDB block parsing logic
  msm: mdss: use uaccess routines to access user space buffers
  cgroup: Fix deadlock in cpu hotplug path
  msm: camera: cpp: Check for valid tx level
  msm: ipa: Add WLAN FW SSR event
  hrtimer: Reset hrtimer cpu base proper on CPU hotplug
  pwm: pwm-qpnp: Fix the uninitialized local variable
  ASoC: msm: qdsp6v2: Add mutex protection for rtac cal apis
  SSM: Remove support for SSM driver

Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>

Conflicts:
	fs/ext4/crypto_key.c
	fs/nsfs.c
	net/bridge/netfilter/ebtables.c
parents 1135c24d 52a2ce8f
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
* Qualcomm Technologies, Inc. Secure Service Module driver

This module enables framework to which a client can register itself
specifying different attributes and defining various permission levels
associated with different combination of attribute values and mode of the system.

Required properties:
- compatible:		Must be "qcom,ssm"

Example:
	qcom,ssm {
		compatible = "qcom,ssm";
	};
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -2672,6 +2672,13 @@ enum drm_mode_status sde_hdmi_mode_valid(struct drm_connector *connector,
	if (actual != requested)
		return MODE_CLOCK_RANGE;

	/* if no format flags are present remove the mode */
	if (!(mode->flags & SDE_DRM_MODE_FLAG_FMT_MASK)) {
		SDE_HDMI_DEBUG("removing following mode from list\n");
		drm_mode_debug_printmodeline(mode);
		return MODE_BAD;
	}

	return MODE_OK;
}

+64 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -124,6 +124,55 @@ static void sde_hdmi_clear_hdr_info(struct drm_bridge *bridge)
	connector->hdr_supported = false;
}

static void sde_hdmi_clear_vsdb_info(struct drm_bridge *bridge)
{
	struct sde_hdmi_bridge *sde_hdmi_bridge = to_hdmi_bridge(bridge);
	struct hdmi *hdmi = sde_hdmi_bridge->hdmi;
	struct drm_connector *connector = hdmi->connector;

	connector->max_tmds_clock = 0;
	connector->latency_present[0] = false;
	connector->latency_present[1] = false;
	connector->video_latency[0] = false;
	connector->video_latency[1] = false;
	connector->audio_latency[0] = false;
	connector->audio_latency[1] = false;
}

static void sde_hdmi_clear_hf_vsdb_info(struct drm_bridge *bridge)
{
	struct sde_hdmi_bridge *sde_hdmi_bridge = to_hdmi_bridge(bridge);
	struct hdmi *hdmi = sde_hdmi_bridge->hdmi;
	struct drm_connector *connector = hdmi->connector;

	connector->max_tmds_char = 0;
	connector->scdc_present = false;
	connector->rr_capable = false;
	connector->supports_scramble = false;
	connector->flags_3d = 0;
}

static void sde_hdmi_clear_vcdb_info(struct drm_bridge *bridge)
{
	struct sde_hdmi_bridge *sde_hdmi_bridge = to_hdmi_bridge(bridge);
	struct hdmi *hdmi = sde_hdmi_bridge->hdmi;
	struct drm_connector *connector = hdmi->connector;

	connector->pt_scan_info = 0;
	connector->it_scan_info = 0;
	connector->ce_scan_info = 0;
	connector->rgb_qs = false;
	connector->yuv_qs = false;
}

static void sde_hdmi_clear_vsdbs(struct drm_bridge *bridge)
{
	/* Clear fields of HDMI VSDB */
	sde_hdmi_clear_vsdb_info(bridge);
	/* Clear fields of HDMI forum VSDB */
	sde_hdmi_clear_hf_vsdb_info(bridge);
}

static void _sde_hdmi_bridge_power_on(struct drm_bridge *bridge)
{
	struct sde_hdmi_bridge *sde_hdmi_bridge = to_hdmi_bridge(bridge);
@@ -574,6 +623,12 @@ static void _sde_hdmi_bridge_disable(struct drm_bridge *bridge)

	mutex_lock(&display->display_lock);

	if (!bridge) {
		SDE_ERROR("Invalid params\n");
		mutex_unlock(&display->display_lock);
		return;
	}

	display->pll_update_enable = false;
	display->sink_hdcp_ver = SDE_HDMI_HDCP_NONE;
	display->sink_hdcp22_support = false;
@@ -582,6 +637,11 @@ static void _sde_hdmi_bridge_disable(struct drm_bridge *bridge)
		sde_hdmi_hdcp_off(display);

	sde_hdmi_clear_hdr_info(bridge);
	/* Clear HDMI VSDB blocks info */
	sde_hdmi_clear_vsdbs(bridge);
	/* Clear HDMI VCDB block info */
	sde_hdmi_clear_vcdb_info(bridge);

	mutex_unlock(&display->display_lock);
}

@@ -907,6 +967,9 @@ static bool _sde_hdmi_bridge_mode_fixup(struct drm_bridge *bridge,
	struct sde_hdmi_bridge *sde_hdmi_bridge = to_hdmi_bridge(bridge);
	struct hdmi *hdmi = sde_hdmi_bridge->hdmi;

	/* Clear the private flags before assigning new one */
	adjusted_mode->private_flags = 0;

	adjusted_mode->private_flags |=
		_sde_hdmi_choose_best_format(hdmi, adjusted_mode);
	SDE_DEBUG("Adjusted mode private flags: 0x%x\n",
+51 −18
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, 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
@@ -252,12 +252,13 @@ static void sde_edid_parse_Y420CMDB(
struct drm_connector *connector, struct sde_edid_ctrl *edid_ctrl,
const u8 *db)
{
	u32 offset = 0;
	u8 cmdb_len = 0;
	u8 svd_len = 0;
	const u8 *svd = NULL;
	u32 i = 0, j = 0;
	u32 i = 0;
	u32 video_format = 0;
	u32 num_cmdb_svd = 0;
	const u32 mult = 8;

	if (!edid_ctrl) {
		DEV_ERR("%s: edid_ctrl is NULL\n", __func__);
@@ -271,8 +272,8 @@ const u8 *db)
	SDE_EDID_DEBUG("%s +\n", __func__);
	cmdb_len = db[0] & 0x1f;

	/* Byte 3 to L+1 contain SVDs */
	offset += 2;
	if (cmdb_len < 1)
		return;

	svd = sde_edid_find_block(edid_ctrl->edid, VIDEO_DATA_BLOCK);

@@ -282,21 +283,26 @@ const u8 *db)
		++svd;
	}

	for (i = 0; i < svd_len; i++, j++) {
	if (cmdb_len == 1)
		num_cmdb_svd = svd_len;
	else {
		num_cmdb_svd = (cmdb_len - 1) * mult;
		if (num_cmdb_svd > svd_len)
			num_cmdb_svd = svd_len;
	}

	for (i = 0; i < num_cmdb_svd; i++) {
		video_format = *(svd + i) & 0x7F;
		if (cmdb_len == 1) {
			/* If cmdb_len is 1, it means all SVDs support YUV */
			sde_edid_set_y420_support(connector, video_format);
		} else if (db[offset] & (1 << j)) {
		/*
		 * If cmdb_len is 1, it means all SVDs support YUV
		 * Else, we check each byte of the cmdb bitmap bitwise
		 * and match those bits with the formats populated
		 * during the parsing of the Video Data Blocks.
		 * Refer to CTA 861-F section 7.5.11 YCBCR 4:2:0 Capability
		 * Map Data Block for more details on this.
		 */
		if (cmdb_len == 1 || (db[2 + i / mult] & (1 << (i % mult))))
			sde_edid_set_y420_support(connector, video_format);

			if (j & 0x80) {
				j = j/8;
				offset++;
				if (offset >= cmdb_len)
					break;
			}
		}
	}

	SDE_EDID_DEBUG("%s -\n", __func__);
@@ -360,6 +366,33 @@ struct drm_connector *connector, struct sde_edid_ctrl *edid_ctrl)
	else
		SDE_EDID_DEBUG("YCbCr420 CMDB is not present\n");

	/*
	 * As per HDMI 2.0 spec, a sink supporting any modes
	 * requiring more than 340Mhz clock rate should support
	 * SCDC as well. This is required because we need the SCDC
	 * channel to set the TMDS clock ratio. However in cases
	 * where the TV publishes such a mode in its list of modes
	 * but does not have SCDC support as per HDMI HFVSDB block
	 * remove RGB mode support from the flags. Currently, in
	 * the list of modes not having deep color support only RGB
	 * modes shall requre a clock of 340Mhz and above such as the
	 * 4K@60fps case. All other modes shall be YUV.
	 * Deep color case is handled separately while choosing the
	 * best mode in the _sde_hdmi_choose_best_format API where
	 * we enable deep color only if it satisfies both source and
	 * sink requirements. However, that API assumes that at least
	 * RGB mode is supported on the mode. Hence, it would be better
	 * to remove the format support flags while parsing the EDID
	 * itself if it doesn't satisfy the HDMI spec requirement.
	 */

	list_for_each_entry(mode, &connector->probed_modes, head) {
		if ((mode->clock > MIN_SCRAMBLER_REQ_RATE) &&
			!connector->scdc_present) {
			mode->flags &= ~DRM_MODE_FLAG_SUPPORTS_RGB;
		}
	}

	SDE_EDID_DEBUG("%s -\n", __func__);
}

+3 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2018, 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
@@ -33,6 +33,8 @@
#define SDE_CEA_EXT    0x02
#define SDE_EXTENDED_TAG 0x07

#define MIN_SCRAMBLER_REQ_RATE 340000

#define SDE_DRM_MODE_FLAG_FMT_MASK (0x3 << 20)

enum extended_data_block_types {
Loading