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

Commit 0ee986b2 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "disp: msm: dp: update the definition of atomic_check function"

parents 52161a09 cf71a83f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#ifndef _DP_CATALOG_H_
#define _DP_CATALOG_H_

#include <drm/drm_dp_helper.h>
#include <drm/msm_drm.h>
#include <drm/sde_drm.h>

#include "dp_parser.h"

+7 −2
Original line number Diff line number Diff line
@@ -2059,6 +2059,7 @@ static enum drm_mode_status dp_display_validate_mode(
	bool dsc_en;
	u32 num_lm = 0;
	int rc = 0;
	u32 pclk_khz = 0;

	if (!dp_display || !mode || !panel ||
			!avail_res || !avail_res->max_mixer_width) {
@@ -2099,8 +2100,12 @@ static enum drm_mode_status dp_display_validate_mode(
		goto end;
	}

	if (mode->clock > dp_display->max_pclk_khz) {
		DP_MST_DEBUG("clk:%d, max:%d\n", mode->clock,
	pclk_khz = dp_mode.timing.widebus_en ?
		(dp_mode.timing.pixel_clk_khz >> 1) :
		(dp_mode.timing.pixel_clk_khz);

	if (pclk_khz > dp_display->max_pclk_khz) {
		DP_MST_DEBUG("clk:%d, max:%d\n", pclk_khz,
				dp_display->max_pclk_khz);
		goto end;
	}
+2 −2
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 */

#ifndef _DP_DISPLAY_H_
@@ -8,7 +8,7 @@

#include <linux/list.h>
#include <drm/drmP.h>
#include <drm/msm_drm.h>
#include <drm/sde_drm.h>

#include "dp_panel.h"

+6 −4
Original line number Diff line number Diff line
@@ -498,18 +498,20 @@ void dp_connector_post_open(struct drm_connector *connector, void *display)

int dp_connector_atomic_check(struct drm_connector *connector,
	void *display,
	struct drm_connector_state *c_state)
	struct drm_atomic_state *a_state)
{
	struct sde_connector *sde_conn;
	struct drm_connector_state *old_state;
	struct drm_connector_state *c_state;

	if (!connector || !display)
	if (!connector || !display || a_state)
		return -EINVAL;

	c_state = drm_atomic_get_new_connector_state(a_state, connector);
	old_state =
		drm_atomic_get_old_connector_state(c_state->state, connector);
		drm_atomic_get_old_connector_state(a_state, connector);

	if (!old_state)
	if (!old_state || !c_state)
		return -EINVAL;

	sde_conn = to_sde_connector(connector);
+6 −4
Original line number Diff line number Diff line
@@ -1390,11 +1390,11 @@ static struct dp_mst_bridge *_dp_mst_get_bridge_from_encoder(
}

static int dp_mst_connector_atomic_check(struct drm_connector *connector,
		void *display, struct drm_connector_state *new_conn_state)
		void *display, struct drm_atomic_state *state)
{
	int rc = 0, slots, i;
	struct drm_atomic_state *state;
	struct drm_connector_state *old_conn_state;
	struct drm_connector_state *new_conn_state;
	struct drm_crtc *old_crtc;
	struct drm_crtc_state *crtc_state;
	struct dp_mst_bridge *bridge = NULL;
@@ -1412,13 +1412,15 @@ static int dp_mst_connector_atomic_check(struct drm_connector *connector,
	if (mst->state == PM_SUSPEND)
		return rc;

	if (!state)
		return rc;

	new_conn_state = drm_atomic_get_new_connector_state(state, connector);
	if (!new_conn_state)
		return rc;

	mutex_lock(&mst->mst_lock);

	state = new_conn_state->state;

	old_conn_state = drm_atomic_get_old_connector_state(state, connector);
	if (!old_conn_state)
		goto mode_set;
Loading