imx-drm: TVE regulator, fb size limit, and ipu-v3 module fixes

- Fix i.MX5 TV encoder probing in case no dac-supply regulator
   is set in the device tree.
 - Remove 64 pixel min_width/height limit, which unnecessarily
   prohibits creation of small frame buffers.
 - Add missing ipu_csi_set_downsize export, for media drivers
   built as modules.
 - Stop modifying pdev->dev.of_node for IPU client devices that
   do not have an OF modalias to fix module autoloading.
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEBsBxhV1FaKwXuCOBUMKIHHCeYOsFAlimobkXHHAuemFiZWxA
 cGVuZ3V0cm9uaXguZGUACgkQUMKIHHCeYOtMGw//YbLEgA/KvTw0WY2qZRmXjk0r
 rYVJqYAdidwns6QiF/P4RsoXfMunk+y430ByS2TUFCFHZY6IQrtPyAylWyPqCoRA
 +NALGAQ4whfkkobLuxyIlJ7ba9sh8DDgCTrStUaDtlpvQwmZ3BbH+g5uWnOeYvX3
 Q9wRBY/w9DgupfKZ0pCT8Hu7YzcY2sOk/EgmroBOTWKBIXlwaHjfVek9H9D9geg7
 6xSlpUp/7nOyX9aX9YJ3eCVrfUKtxFIrVepmvsdZw1p0r11/TgoAcJ5E7OBjJE26
 IVONxjHE7NYroaq9qLp1LJf0i/htTKABAKirxso5NIlqpUPRnUqWRTXr7fZTIv64
 D9slhxZzfnjS1X+9dMGykLm1Aj+DN84tqCw2y/+qVhSir2T8n9x/j9HQTy1NBCuh
 esu18pCWBI7bPWD1UCaTn7qPhlatSPrNoHokD83xzSAnZgT9Efvli3eLPnrMPY1z
 oNsZ5rGTI3m2TMLMYjWI+XRjWDR3yNwRMzQZR3DTxV9FZNIfgyPkjRGbGJmDQsN9
 ptonQ1KReJnUXrFb7V1QMWlFvUMbDEN6fzuz6Gl4JrBVcjm1+WWcCYRgK/C0DfWb
 xFPexIar3LX0w8QMbLPfYMHNhG3gTA9/kuj2FVV63kdnaaa4PJbhC0nmSQd/8Lnj
 YW/VkTmYWTtfay5+5GU=
 =hfko
 -----END PGP SIGNATURE-----

Merge tag 'imx-drm-fixes-2017-02-17' of https://git.pengutronix.de/git/pza/linux into drm-next

imx-drm: TVE regulator, fb size limit, and ipu-v3 module fixes

- Fix i.MX5 TV encoder probing in case no dac-supply regulator
  is set in the device tree.
- Remove 64 pixel min_width/height limit, which unnecessarily
  prohibits creation of small frame buffers.
- Add missing ipu_csi_set_downsize export, for media drivers
  built as modules.
- Stop modifying pdev->dev.of_node for IPU client devices that
  do not have an OF modalias to fix module autoloading.

* tag 'imx-drm-fixes-2017-02-17' of https://git.pengutronix.de/git/pza/linux:
  gpu: ipu-v3: Stop overwriting pdev->dev.of_node of child devices
  gpu: ipu-v3: export ipu_csi_set_downsize
  drm/imx: lift 64x64 pixel minimum framebuffer size requirement
  drm/imx: imx-tve: Do not set the regulator voltage
This commit is contained in:
Dave Airlie 2017-02-23 12:10:42 +10:00
commit 43f86c9470
4 changed files with 7 additions and 11 deletions

View File

@ -357,8 +357,8 @@ static int imx_drm_bind(struct device *dev)
* this value would be used to check framebuffer size limitation
* at drm_mode_addfb().
*/
drm->mode_config.min_width = 64;
drm->mode_config.min_height = 64;
drm->mode_config.min_width = 1;
drm->mode_config.min_height = 1;
drm->mode_config.max_width = 4096;
drm->mode_config.max_height = 4096;
drm->mode_config.funcs = &imx_drm_mode_config_funcs;

View File

@ -98,6 +98,8 @@
/* TVE_TST_MODE_REG */
#define TVE_TVDAC_TEST_MODE_MASK (0x7 << 0)
#define IMX_TVE_DAC_VOLTAGE 2750000
enum {
TVE_MODE_TVOUT,
TVE_MODE_VGA,
@ -616,9 +618,8 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)
tve->dac_reg = devm_regulator_get(dev, "dac");
if (!IS_ERR(tve->dac_reg)) {
ret = regulator_set_voltage(tve->dac_reg, 2750000, 2750000);
if (ret)
return ret;
if (regulator_get_voltage(tve->dac_reg) != IMX_TVE_DAC_VOLTAGE)
dev_warn(dev, "dac voltage is not %d uV\n", IMX_TVE_DAC_VOLTAGE);
ret = regulator_enable(tve->dac_reg);
if (ret)
return ret;

View File

@ -1238,12 +1238,6 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
platform_device_put(pdev);
goto err_register;
}
/*
* Set of_node only after calling platform_device_add. Otherwise
* the platform:imx-ipuv3-crtc modalias won't be used.
*/
pdev->dev.of_node = of_node;
}
return 0;

View File

@ -544,6 +544,7 @@ void ipu_csi_set_downsize(struct ipu_csi *csi, bool horiz, bool vert)
spin_unlock_irqrestore(&csi->lock, flags);
}
EXPORT_SYMBOL_GPL(ipu_csi_set_downsize);
void ipu_csi_set_test_generator(struct ipu_csi *csi, bool active,
u32 r_value, u32 g_value, u32 b_value,