drm/tegra: Changes for v3.12-rc1

Only a couple of small patches this time around. These are mostly fixes
 for minor bugs that showed up, but there is also some preparatory work
 that will come in handy for future patches.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.21 (GNU/Linux)
 
 iQIcBAABAgAGBQJSJZy2AAoJEN0jrNd/PrOhjRgP/jWJhT/HaHsJtbVMy/txSDjP
 s8EYir6lPflk2Eq12+QEjRtlUp7vov3U19G4LL4/XCsDY72dNAc3NKsIBPnZYADs
 nPk8P3FsICa9pwcilJczSHAP9G83mqkawa7WACQFppMQQ1pW3BI6smQ7Ku/U4Naq
 QdCi7kW1xjzIv+PXBxBv9rwGord1sLuSL6gFqFPGmhp4S3cG3j/8aglhBq8DIURB
 fzmK9+Sj2Fn4za3dgySSUG0Rl0ssBjiZnXYPLIC3dZKej+eXsM3MlWdKv60BnSV5
 wQVDAjoT+JlU/dJ2V46E60Z+TjGXJMwwIgPeInC2/j+DYU+MvxFXIASFzGUnaGKB
 cE7geQrtpef8yhfxXX9VsOs/p6Zw/e9Dsg1uH9cwJwjY8j6xSXVSu+A/0UcuWIb5
 EWPhhTWDbXCp4bKuBHKiMjzmTEGg3VeubxRNTpADMy9Q+vK0ffqTLUt7QXt+wVJz
 GngM+O2Puub6ZiC1/qJ934jTMcbLVWlBD7lsplRAAH4SlfMTzQtwp8rGDUwrYBZb
 Iz4m9F1X2+fW5LeyOga9Lu0qCBFXeROFvpKIkHA7MjEgt58gy6+OMvVC2H5Lsw0V
 RPS9wFBARbT/KIv+XRJ0QGMWRWnhHcqfEwal6YqsdqNirPkYd7iclMUT7WuMvsiz
 WI0nGDlnppl8x/ow34Nx
 =sT4w
 -----END PGP SIGNATURE-----

Merge tag 'drm/for-3.12-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/tegra: Changes for v3.12-rc1

Only a couple of small patches this time around. These are mostly fixes
for minor bugs that showed up, but there is also some preparatory work
that will come in handy for future patches.

* tag 'drm/for-3.12-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/tegra: Parse device tree earlier
  gpu: host1x: Sort drivers by probe order
  gpu: host1x: Check for valid host1x pointer
  gpu: host1x: returning success instead of -ENOMEM
  gpu: host1x: fix an integer overflow check
  drm/tegra: hdmi: Make sure clock is enabled before dumping registers
This commit is contained in:
Dave Airlie 2013-09-04 09:01:02 +10:00
commit ef25bd84ed
5 changed files with 23 additions and 17 deletions

View File

@ -43,7 +43,7 @@ void host1x_set_drm_data(struct device *dev, void *data)
void *host1x_get_drm_data(struct device *dev)
{
struct host1x *host1x = dev_get_drvdata(dev);
return host1x->drm_data;
return host1x ? host1x->drm_data : NULL;
}
void host1x_sync_writel(struct host1x *host1x, u32 v, u32 r)

View File

@ -301,8 +301,8 @@ static inline void host1x_hw_show_mlocks(struct host1x *host, struct output *o)
host->debug_op->show_mlocks(host, o);
}
extern struct platform_driver tegra_hdmi_driver;
extern struct platform_driver tegra_dc_driver;
extern struct platform_driver tegra_hdmi_driver;
extern struct platform_driver tegra_gr2d_driver;
#endif

View File

@ -888,6 +888,11 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)
{
struct drm_info_node *node = s->private;
struct tegra_hdmi *hdmi = node->info_ent->data;
int err;
err = clk_enable(hdmi->clk);
if (err)
return err;
#define DUMP_REG(name) \
seq_printf(s, "%-56s %#05x %08lx\n", #name, name, \
@ -1053,6 +1058,8 @@ static int tegra_hdmi_show_regs(struct seq_file *s, void *data)
#undef DUMP_REG
clk_disable(hdmi->clk);
return 0;
}

View File

@ -147,6 +147,13 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
if (!rgb)
return -ENOMEM;
rgb->output.dev = dc->dev;
rgb->output.of_node = np;
err = tegra_output_parse_dt(&rgb->output);
if (err < 0)
return err;
rgb->clk = devm_clk_get(dc->dev, NULL);
if (IS_ERR(rgb->clk)) {
dev_err(dc->dev, "failed to get clock\n");
@ -165,13 +172,6 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc)
return err;
}
rgb->output.dev = dc->dev;
rgb->output.of_node = np;
err = tegra_output_parse_dt(&rgb->output);
if (err < 0)
return err;
dc->rgb = &rgb->output;
return 0;

View File

@ -42,12 +42,12 @@ struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
/* Check that we're not going to overflow */
total = sizeof(struct host1x_job) +
num_relocs * sizeof(struct host1x_reloc) +
num_unpins * sizeof(struct host1x_job_unpin_data) +
num_waitchks * sizeof(struct host1x_waitchk) +
num_cmdbufs * sizeof(struct host1x_job_gather) +
num_unpins * sizeof(dma_addr_t) +
num_unpins * sizeof(u32 *);
(u64)num_relocs * sizeof(struct host1x_reloc) +
(u64)num_unpins * sizeof(struct host1x_job_unpin_data) +
(u64)num_waitchks * sizeof(struct host1x_waitchk) +
(u64)num_cmdbufs * sizeof(struct host1x_job_gather) +
(u64)num_unpins * sizeof(dma_addr_t) +
(u64)num_unpins * sizeof(u32 *);
if (total > ULONG_MAX)
return NULL;
@ -466,9 +466,8 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
&job->gather_copy,
GFP_KERNEL);
if (!job->gather_copy_mapped) {
int err = PTR_ERR(job->gather_copy_mapped);
job->gather_copy_mapped = NULL;
return err;
return -ENOMEM;
}
job->gather_copy_size = size;