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

Commit 8ea37c09 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Refactor deterministic frame rate control"

parents 00d711dd f80de296
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -62,3 +62,13 @@ config FB_MSM_MDSS_XLOG_DEBUG
	features to: Dump MDSS registers during driver errors, panic
	driver during fatal errors and enable some display-driver logging
	into an internal buffer (this avoids logging overhead).

config FB_MSM_MDSS_FRC_DEBUG
	depends on DEBUG_FS && FB_MSM_MDSS
	bool "Enable Video FRC debugging"
	default n
	---help---
	The MDSS FRC debugging provides support to enable the deterministic
	frame rate control (FRC) debugging features to: Collect video frame
	statistics and check whether its output pattern matches expected
	cadence.
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,10 @@ ifeq ($(CONFIG_FB_MSM_MDSS),y)
obj-$(CONFIG_DEBUG_FS) += mdss_debug.o mdss_debug_xlog.o
endif

ifeq ($(CONFIG_FB_MSM_MDSS_FRC_DEBUG),y)
obj-$(CONFIG_DEBUG_FS) += mdss_debug_frc.o
endif

mdss-dsi-objs := mdss_dsi.o mdss_dsi_host.o mdss_dsi_cmd.o mdss_dsi_status.o
mdss-dsi-objs += mdss_dsi_panel.o
mdss-dsi-objs += msm_mdss_io_8974.o
+27 −0
Original line number Diff line number Diff line
@@ -303,6 +303,7 @@ static int __compat_atomic_commit(struct fb_info *info, unsigned int cmd,
	struct mdp_input_layer *layer_list = NULL;
	struct mdp_input_layer32 *layer_list32 = NULL;
	struct mdp_output_layer *output_layer = NULL;
	struct mdp_frc_info *frc_info = NULL;

	/* copy top level memory from 32 bit structure to kernel memory */
	ret = copy_from_user(&commit32, (void __user *)argp,
@@ -362,6 +363,29 @@ static int __compat_atomic_commit(struct fb_info *info, unsigned int cmd,
		}
	}

	if (commit32.commit_v1.frc_info) {
		int buffer_size = sizeof(struct mdp_frc_info);

		frc_info = kzalloc(buffer_size, GFP_KERNEL);
		if (!frc_info) {
			ret = -ENOMEM;
			goto frc_err;
		}

		ret = copy_from_user(frc_info,
				compat_ptr(commit32.commit_v1.frc_info),
				buffer_size);
		if (ret) {
			pr_err("fail to copy frc info from user, ptr %p\n",
				compat_ptr(commit32.commit_v1.frc_info));
			kfree(frc_info);
			ret = -EFAULT;
			goto frc_err;
		}

		commit.commit_v1.frc_info = frc_info;
	}

	ret = mdss_fb_atomic_commit(info, &commit, file);
	if (ret)
		pr_err("atomic commit failed ret:%d\n", ret);
@@ -374,6 +398,9 @@ static int __compat_atomic_commit(struct fb_info *info, unsigned int cmd,
		kfree(layer_list[i].scale);
		mdss_mdp_free_layer_pp_info(&layer_list[i]);
	}

	kfree(frc_info);
frc_err:
	kfree(layer_list);
layer_list_err:
	kfree(layer_list32);
+3 −2
Original line number Diff line number Diff line
@@ -19,9 +19,9 @@
 * To allow proper structure padding for 64bit/32bit target
 */
#ifdef __LP64
#define MDP_LAYER_COMMIT_V1_PAD 3
#define MDP_LAYER_COMMIT_V1_PAD 2
#else
#define MDP_LAYER_COMMIT_V1_PAD 4
#define MDP_LAYER_COMMIT_V1_PAD 3
#endif

struct mdp_buf_sync32 {
@@ -534,6 +534,7 @@ struct mdp_layer_commit_v1_32 {
	uint32_t		input_layer_cnt;
	compat_caddr_t		output_layer;
	int			retire_fence;
	compat_caddr_t		frc_info;
	compat_caddr_t		dest_scaler;
	uint32_t                dest_scaler_cnt;
	uint32_t		reserved[MDP_LAYER_COMMIT_V1_PAD];
+3 −0
Original line number Diff line number Diff line
@@ -1192,6 +1192,9 @@ int mdss_debugfs_init(struct mdss_data_type *mdata)
	if (mdss_create_xlog_debug(mdd))
		goto err;

	if (mdss_create_frc_debug(mdd))
		goto err;

	mdata->debug_inf.debug_data = mdd;

	return 0;
Loading