History

Merge branch 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next

fsl-dcu fixes. * 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: disable clock on error path drm/fsl-dcu: use PTR_ERR_OR_ZERO() to simplify the code drm/fsl-dcu: fix endian issue when using clk_register_divider

Dave Airlie committed 10 years ago

Commit 52f13a02 parents 26e34d2 e0dc7c82 files · +11 −6Browse files

Unified · Split

2 files
  1. drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c +10 −2
  2. drivers/gpu/drm/fsl-dcu/fsl_tcon.c +1 −4
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c+10−2
@@ -270,7 +270,7 @@ static int fsl_dcu_drm_pm_resume(struct device *dev) · 269 unmodified lines
270270 ret = clk_prepare_enable(fsl_dev->pix_clk);
271271 if (ret < 0) {
272272 dev_err(dev, "failed to enable pix clk\n");
273− return ret;
273+ goto disable_dcu_clk;
274274 }
275275
276276 fsl_dcu_drm_init_planes(fsl_dev->drm);
@@ -284,6 +284,10 @@ static int fsl_dcu_drm_pm_resume(struct device *dev) · 7 unmodified lines
284284 enable_irq(fsl_dev->irq);
285285
286286 return 0;
287+
288+disable_dcu_clk:
289+ clk_disable_unprepare(fsl_dev->clk);
290+ return ret;
287291 }
288292 #endif
289293
@@ -330,6 +334,7 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) · 40 unmodified lines
330334 const char *pix_clk_in_name;
331335 const struct of_device_id *id;
332336 int ret;
337+ u8 div_ratio_shift = 0;
333338
334339 fsl_dev = devm_kzalloc(dev, sizeof(*fsl_dev), GFP_KERNEL);
335340 if (!fsl_dev)
@@ -382,11 +387,14 @@ static int fsl_dcu_drm_probe(struct platform_device *pdev) · 46 unmodified lines
382387 pix_clk_in = fsl_dev->clk;
383388 }
384389
390+ if (of_property_read_bool(dev->of_node, "big-endian"))
391+ div_ratio_shift = 24;
392+
385393 pix_clk_in_name = __clk_get_name(pix_clk_in);
386394 snprintf(pix_clk_name, sizeof(pix_clk_name), "%s_pix", pix_clk_in_name);
387395 fsl_dev->pix_clk = clk_register_divider(dev, pix_clk_name,
388396 pix_clk_in_name, 0, base + DCU_DIV_RATIO,
389− 0, 8, CLK_DIVIDER_ROUND_CLOSEST, NULL);
397+ div_ratio_shift, 8, CLK_DIVIDER_ROUND_CLOSEST, NULL);
390398 if (IS_ERR(fsl_dev->pix_clk)) {
391399 dev_err(dev, "failed to register pix clk\n");
392400 ret = PTR_ERR(fsl_dev->pix_clk);
drivers/gpu/drm/fsl-dcu/fsl_tcon.c+1−4
@@ -57,10 +57,7 @@ static int fsl_tcon_init_regmap(struct device *dev, · 56 unmodified lines
5757
5858 tcon->regs = devm_regmap_init_mmio(dev, regs,
5959 &fsl_tcon_regmap_config);
60− if (IS_ERR(tcon->regs))
61− return PTR_ERR(tcon->regs);
62−
63− return 0;
60+ return PTR_ERR_OR_ZERO(tcon->regs);
6461 }
6562
6663 struct fsl_tcon *fsl_tcon_init(struct device *dev)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t