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

Commit b0a2c151 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'msm-fixes-3.16' of git://people.freedesktop.org/~robclark/linux into drm-fixes

A handful of fixes from various folks.

* 'msm-fixes-3.16' of git://people.freedesktop.org/~robclark/linux:
  drm/msm: fix IOMMU cleanup for -EPROBE_DEFER
  drm/msm: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE)
  drm/msm/hdmi: set hdp clock rate before prepare_enable
  drm/msm: storage class should be before const qualifier
  drm/msm: Replace type of paddr to uint32_t.
parents 1539fb9b 87e956e9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -277,6 +277,7 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
	static const char *hpd_reg_names[] = {"hpd-gdsc", "hpd-5v"};
	static const char *pwr_reg_names[] = {"core-vdda", "core-vcc"};
	static const char *hpd_clk_names[] = {"iface_clk", "core_clk", "mdp_core_clk"};
	static unsigned long hpd_clk_freq[] = {0, 19200000, 0};
	static const char *pwr_clk_names[] = {"extp_clk", "alt_iface_clk"};

	config.phy_init      = hdmi_phy_8x74_init;
@@ -286,6 +287,7 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
	config.pwr_reg_names = pwr_reg_names;
	config.pwr_reg_cnt   = ARRAY_SIZE(pwr_reg_names);
	config.hpd_clk_names = hpd_clk_names;
	config.hpd_freq      = hpd_clk_freq;
	config.hpd_clk_cnt   = ARRAY_SIZE(hpd_clk_names);
	config.pwr_clk_names = pwr_clk_names;
	config.pwr_clk_cnt   = ARRAY_SIZE(pwr_clk_names);
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ struct hdmi_platform_config {

	/* clks that need to be on for hpd: */
	const char **hpd_clk_names;
	const long unsigned *hpd_freq;
	int hpd_clk_cnt;

	/* clks that need to be on for screen pwr (ie pixel clk): */
+8 −0
Original line number Diff line number Diff line
@@ -127,6 +127,14 @@ static int hpd_enable(struct hdmi_connector *hdmi_connector)
	}

	for (i = 0; i < config->hpd_clk_cnt; i++) {
		if (config->hpd_freq && config->hpd_freq[i]) {
			ret = clk_set_rate(hdmi->hpd_clks[i],
					config->hpd_freq[i]);
			if (ret)
				dev_warn(dev->dev, "failed to set clk %s (%d)\n",
						config->hpd_clk_names[i], ret);
		}

		ret = clk_prepare_enable(hdmi->hpd_clks[i]);
		if (ret) {
			dev_err(dev->dev, "failed to enable hpd clk: %s (%d)\n",
+17 −5
Original line number Diff line number Diff line
@@ -20,6 +20,10 @@
#include "msm_mmu.h"
#include "mdp5_kms.h"

static const char *iommu_ports[] = {
		"mdp_0",
};

static struct mdp5_platform_config *mdp5_get_config(struct platform_device *dev);

static int mdp5_hw_init(struct msm_kms *kms)
@@ -104,6 +108,12 @@ static void mdp5_preclose(struct msm_kms *kms, struct drm_file *file)
static void mdp5_destroy(struct msm_kms *kms)
{
	struct mdp5_kms *mdp5_kms = to_mdp5_kms(to_mdp_kms(kms));
	struct msm_mmu *mmu = mdp5_kms->mmu;

	if (mmu) {
		mmu->funcs->detach(mmu, iommu_ports, ARRAY_SIZE(iommu_ports));
		mmu->funcs->destroy(mmu);
	}
	kfree(mdp5_kms);
}

@@ -216,10 +226,6 @@ fail:
	return ret;
}

static const char *iommu_ports[] = {
		"mdp_0",
};

static int get_clk(struct platform_device *pdev, struct clk **clkp,
		const char *name)
{
@@ -317,17 +323,23 @@ struct msm_kms *mdp5_kms_init(struct drm_device *dev)
		mmu = msm_iommu_new(dev, config->iommu);
		if (IS_ERR(mmu)) {
			ret = PTR_ERR(mmu);
			dev_err(dev->dev, "failed to init iommu: %d\n", ret);
			goto fail;
		}

		ret = mmu->funcs->attach(mmu, iommu_ports,
				ARRAY_SIZE(iommu_ports));
		if (ret)
		if (ret) {
			dev_err(dev->dev, "failed to attach iommu: %d\n", ret);
			mmu->funcs->destroy(mmu);
			goto fail;
		}
	} else {
		dev_info(dev->dev, "no iommu, fallback to phys "
				"contig buffers for scanout\n");
		mmu = NULL;
	}
	mdp5_kms->mmu = mmu;

	mdp5_kms->id = msm_register_mmu(dev, mmu);
	if (mdp5_kms->id < 0) {
+1 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ struct mdp5_kms {

	/* mapper-id used to request GEM buffer mapped for scanout: */
	int id;
	struct msm_mmu *mmu;

	/* for tracking smp allocation amongst pipes: */
	mdp5_smp_state_t smp_state;
Loading