Lines Matching defs:dc
602 atmel_hlcdc_dc_mode_valid(struct atmel_hlcdc_dc *dc,
612 if (hsync_len > dc->desc->max_spw + 1 || hsync_len < 1)
615 if (vsync_len > dc->desc->max_spw + 1 || vsync_len < 1)
618 if (hfront_porch > dc->desc->max_hpw + 1 || hfront_porch < 1 ||
619 hback_porch > dc->desc->max_hpw + 1 || hback_porch < 1 ||
623 if (vfront_porch > dc->desc->max_vpw + 1 || vfront_porch < 1 ||
624 vback_porch > dc->desc->max_vpw || vback_porch < 0 ||
645 struct atmel_hlcdc_dc *dc = dev->dev_private;
650 regmap_read(dc->hlcdc->regmap, ATMEL_HLCDC_IMR, &imr);
651 regmap_read(dc->hlcdc->regmap, ATMEL_HLCDC_ISR, &isr);
657 atmel_hlcdc_crtc_irq(dc->crtc);
661 atmel_hlcdc_layer_irq(dc->layers[i]);
669 struct atmel_hlcdc_dc *dc = dev->dev_private;
675 if (dc->layers[i])
679 regmap_write(dc->hlcdc->regmap, ATMEL_HLCDC_IER, cfg);
684 struct atmel_hlcdc_dc *dc = dev->dev_private;
687 regmap_write(dc->hlcdc->regmap, ATMEL_HLCDC_IDR, 0xffffffff);
688 regmap_read(dc->hlcdc->regmap, ATMEL_HLCDC_ISR, &isr);
720 struct atmel_hlcdc_dc *dc = dev->dev_private;
743 dev->mode_config.min_width = dc->desc->min_width;
744 dev->mode_config.min_height = dc->desc->min_height;
745 dev->mode_config.max_width = dc->desc->max_width;
746 dev->mode_config.max_height = dc->desc->max_height;
757 struct atmel_hlcdc_dc *dc;
771 dc = devm_kzalloc(dev->dev, sizeof(*dc), GFP_KERNEL);
772 if (!dc)
775 dc->desc = match->data;
776 dc->hlcdc = dev_get_drvdata(dev->dev->parent);
777 dev->dev_private = dc;
779 ret = clk_prepare_enable(dc->hlcdc->periph_clk);
802 ret = atmel_hlcdc_dc_irq_install(dev, dc->hlcdc->irq);
817 clk_disable_unprepare(dc->hlcdc->periph_clk);
824 struct atmel_hlcdc_dc *dc = dev->dev_private;
837 clk_disable_unprepare(dc->hlcdc->periph_clk);
900 struct atmel_hlcdc_dc *dc = drm_dev->dev_private;
901 struct regmap *regmap = dc->hlcdc->regmap;
908 dc->suspend.state = state;
910 regmap_read(regmap, ATMEL_HLCDC_IMR, &dc->suspend.imr);
911 regmap_write(regmap, ATMEL_HLCDC_IDR, dc->suspend.imr);
912 clk_disable_unprepare(dc->hlcdc->periph_clk);
920 struct atmel_hlcdc_dc *dc = drm_dev->dev_private;
922 clk_prepare_enable(dc->hlcdc->periph_clk);
923 regmap_write(dc->hlcdc->regmap, ATMEL_HLCDC_IER, dc->suspend.imr);
925 return drm_atomic_helper_resume(drm_dev, dc->suspend.state);
953 MODULE_ALIAS("platform:atmel-hlcdc-dc");