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

Commit cf454d5e 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: Add QPIC display support"

parents 1e9ba30d ccffca10
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1027,6 +1027,11 @@ static int mdss_fb_probe(struct platform_device *pdev)
	if (!pdata)
		return -EPROBE_DEFER;

	if (!mdp_instance) {
		pr_err("mdss mdp resource not initialized yet\n");
		return -ENODEV;
	}

	/*
	 * alloc framebuffer info + par data
	 */
@@ -3279,8 +3284,10 @@ void mdss_panelinfo_to_fb_var(struct mdss_panel_info *pinfo,
	var->right_margin = pinfo->lcdc.h_front_porch;
	var->left_margin = pinfo->lcdc.h_back_porch;
	var->hsync_len = pinfo->lcdc.h_pulse_width;
	var->pixclock = KHZ2PICOS((unsigned long int)pinfo->clk_rate/1000);

	if (pinfo->clk_rate)
		var->pixclock = KHZ2PICOS((unsigned long int)
			pinfo->clk_rate/1000);
	if (pinfo->physical_width)
		var->width = pinfo->physical_width;
	if (pinfo->physical_height)
+16 −0
Original line number Diff line number Diff line
@@ -1458,4 +1458,20 @@ void mdss_mdp_wb_free(struct mdss_mdp_writeback *wb);
void mdss_mdp_ctl_dsc_setup(struct mdss_mdp_ctl *ctl,
	struct mdss_panel_info *pinfo);

#ifdef CONFIG_FB_MSM_MDP_NONE
struct mdss_data_type *mdss_mdp_get_mdata(void)
{
	return NULL;
}

int mdss_mdp_copy_layer_pp_info(struct mdp_input_layer *layer)
{
	return -EFAULT;
}

void mdss_mdp_free_layer_pp_info(struct mdp_input_layer *layer)
{
}

#endif /* CONFIG_FB_MSM_MDP_NONE */
#endif /* MDSS_MDP_H */
+4 −3
Original line number Diff line number Diff line
@@ -1006,7 +1006,8 @@ struct mdss_panel_timing *mdss_panel_get_timing_by_name(
		const char *name);
#else
static inline int mdss_panel_debugfs_init(
			struct mdss_panel_info *panel_info) { return 0; };
		struct mdss_panel_info *panel_info,
		char const *panel_name) { return 0; };
static inline void mdss_panel_debugfs_cleanup(
		struct mdss_panel_info *panel_info) { };
static inline void mdss_panel_debugfsinfo_to_panelinfo(
+26 −4
Original line number Diff line number Diff line
/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, 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
@@ -32,7 +32,6 @@

#include <linux/msm-sps.h>
#include <linux/msm-bus.h>
#include <mach/hardware.h>

#include "mdss_fb.h"
#include "mdss_qpic.h"
@@ -71,7 +70,12 @@ static struct platform_driver mdss_qpic_driver = {
int qpic_on(struct msm_fb_data_type *mfd)
{
	int ret;

	if (qpic_res->qpic_a_clk)
		clk_prepare_enable(qpic_res->qpic_a_clk);

	ret = mdss_qpic_panel_on(qpic_res->panel_data, &qpic_res->panel_io);
	qpic_res->qpic_is_on = true;
	return ret;
}

@@ -81,6 +85,12 @@ int qpic_off(struct msm_fb_data_type *mfd)
	ret = mdss_qpic_panel_off(qpic_res->panel_data, &qpic_res->panel_io);
	if (use_irq)
		qpic_interrupt_en(false);

	if (qpic_res->qpic_a_clk)
		clk_disable_unprepare(qpic_res->qpic_a_clk);

	qpic_res->qpic_is_on = false;

	return ret;
}

@@ -110,6 +120,11 @@ static void mdss_qpic_pan_display(struct msm_fb_data_type *mfd)
		return;
	}

	if (!qpic_res->qpic_is_on) {
		pr_err("%s: Failed since panel is not ON\n");
		return;
	}

	fbi = mfd->fbi;

	bpp = fbi->var.bits_per_pixel / 8;
@@ -210,6 +225,9 @@ int qpic_register_panel(struct mdss_panel_data *pdata)
	struct platform_device *mdss_fb_dev = NULL;
	int rc;

	if (!qpic_res)
		return -ENODEV;

	mdss_fb_dev = platform_device_alloc("mdss_fb", pdata->panel_info.pdest);
	if (!mdss_fb_dev) {
		pr_err("unable to allocate mdss_fb device\n");
@@ -448,7 +466,7 @@ static int qpic_wait_for_fifo(void)
		data &= 0x3F;
		if (data == 0)
			return ret;
		INIT_COMPLETION(qpic_res->fifo_eof_comp);
		reinit_completion(&qpic_res->fifo_eof_comp);
		QPIC_OUTP(QPIC_REG_QPIC_LCDC_IRQ_EN, (1 << 4));
		ret = wait_for_completion_timeout(&qpic_res->fifo_eof_comp,
				msecs_to_jiffies(QPIC_MAX_VSYNC_WAIT_TIME));
@@ -487,7 +505,7 @@ static int qpic_wait_for_eof(void)
		data = QPIC_INP(QPIC_REG_QPIC_LCDC_IRQ_STTS);
		if (data & (1 << 2))
			return ret;
		INIT_COMPLETION(qpic_res->fifo_eof_comp);
		reinit_completion(&qpic_res->fifo_eof_comp);
		QPIC_OUTP(QPIC_REG_QPIC_LCDC_IRQ_EN, (1 << 2));
		ret = wait_for_completion_timeout(&qpic_res->fifo_eof_comp,
				msecs_to_jiffies(QPIC_MAX_VSYNC_WAIT_TIME));
@@ -738,6 +756,10 @@ static int mdss_qpic_probe(struct platform_device *pdev)
		goto probe_done;
	}

	qpic_res->qpic_a_clk = clk_get(&pdev->dev, "core_a_clk");
	if (IS_ERR(qpic_res->qpic_a_clk))
		pr_err("%s: Can't find core_a_clk", __func__);

	qpic_res->irq = res->start;
	qpic_res->res_init = true;

+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, 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
@@ -15,7 +15,6 @@
#define MDSS_QPIC_H

#include <linux/list.h>
#include <mach/scm-io.h>
#include <linux/msm-sps.h>

#include <linux/pinctrl/consumer.h>
@@ -86,6 +85,8 @@ struct qpic_data_type {
	struct qpic_panel_io_desc panel_io;
	u32 bus_handle;
	struct completion fifo_eof_comp;
	u32 qpic_is_on;
	struct clk *qpic_a_clk;
};

u32 qpic_send_frame(
Loading