ipu-v3 probe and imx-drm crtc and plane fixes
- Fix ipu probe if optional port nodes are not present in the device tree - Reset the ipu before initializing interrupts, not thereafter - Notify DRM core about the state of vblank interrupts - Add missing RGB565 format to the list of plate formats -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJWxs28AAoJEFDCiBxwnmDre0IP/3f3EaTmFP8bSzCW4rtEMn26 t5+frIRg/y7waM/BC5iK9jbi98oqKGdWB2kiaA8uS4jowS3AdD8wHN/9/W20onBF BVrNbMELRSNqOTGxgjouO7FB/2FwvlKRZzFJlIQ4Xci/PFDkyVZ+Bhva+4L4kvNg iHanmUM3nVsgCukefvkboVUJTfAkMsT1jd64Z8UDa+Bl6zsVsnzIUtHQKOzD6lwk Pq+/d6l4B9dFbZLkhITI+A3N7GbjJ20SEjn+LOYehjTz8B3BWw9K5BvWndr2x6yX /hTYSE2nVdsGOdZrwuYZY2pOocLvApme7raB8CSgsXzktZ+BBbDprsxae08ecGEg qyekFuVGTrMzvpuBkMk16Phh6g7F2oTNzJ9mdR3c9J3Eoolc3d7ZVN9ZUtjqiCk5 XArrQMG9WbW9e6pFWIc3tpYRfybNN7oIEUAJnI7VKpeh56osIUXTCtXreyVxBDu6 ycKE4ZNsX2Fu+XhDk2enMtOdmNm32x1waR3vbKdIfJY0fjSd+N9FOt5SUXNlwzSX NhLOLPYRorQ7cj72RvavEQCAtOywsoHWRLwdMDj4BAND1o4KcXzANb2ZwGH8awMk beG8+0ZKM3HWzkhrpqti7StCrhWQNlmfkUgTu6/PX++m+SplII27cScKqFQZuFWm M4YCzksuVhO6dgAT05zt =9nEz -----END PGP SIGNATURE----- Merge tag 'imx-drm-fixes-2016-02-19' of git://git.pengutronix.de/git/pza/linux into drm-fixes ipu-v3 probe and imx-drm crtc and plane fixes - Fix ipu probe if optional port nodes are not present in the device tree - Reset the ipu before initializing interrupts, not thereafter - Notify DRM core about the state of vblank interrupts - Add missing RGB565 format to the list of plate formats * tag 'imx-drm-fixes-2016-02-19' of git://git.pengutronix.de/git/pza/linux: drm/imx: Add missing DRM_FORMAT_RGB565 to ipu_plane_formats drm/imx: notify DRM core about CRTC vblank state gpu: ipu-v3: Reset IPU before activating IRQ gpu: ipu-v3: Do not bail out on missing optional port nodes
This commit is contained in:
commit
848819c544
|
@ -64,6 +64,7 @@ static void ipu_fb_enable(struct ipu_crtc *ipu_crtc)
|
|||
/* Start DC channel and DI after IDMAC */
|
||||
ipu_dc_enable_channel(ipu_crtc->dc);
|
||||
ipu_di_enable(ipu_crtc->di);
|
||||
drm_crtc_vblank_on(&ipu_crtc->base);
|
||||
|
||||
ipu_crtc->enabled = 1;
|
||||
}
|
||||
|
@ -80,6 +81,7 @@ static void ipu_fb_disable(struct ipu_crtc *ipu_crtc)
|
|||
ipu_di_disable(ipu_crtc->di);
|
||||
ipu_plane_disable(ipu_crtc->plane[0]);
|
||||
ipu_dc_disable(ipu);
|
||||
drm_crtc_vblank_off(&ipu_crtc->base);
|
||||
|
||||
ipu_crtc->enabled = 0;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ static const uint32_t ipu_plane_formats[] = {
|
|||
DRM_FORMAT_YVYU,
|
||||
DRM_FORMAT_YUV420,
|
||||
DRM_FORMAT_YVU420,
|
||||
DRM_FORMAT_RGB565,
|
||||
};
|
||||
|
||||
int ipu_plane_irq(struct ipu_plane *ipu_plane)
|
||||
|
|
|
@ -1050,6 +1050,17 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
|
|||
for (i = 0; i < ARRAY_SIZE(client_reg); i++) {
|
||||
const struct ipu_platform_reg *reg = &client_reg[i];
|
||||
struct platform_device *pdev;
|
||||
struct device_node *of_node;
|
||||
|
||||
/* Associate subdevice with the corresponding port node */
|
||||
of_node = of_graph_get_port_by_id(dev->of_node, i);
|
||||
if (!of_node) {
|
||||
dev_info(dev,
|
||||
"no port@%d node in %s, not using %s%d\n",
|
||||
i, dev->of_node->full_name,
|
||||
(i / 2) ? "DI" : "CSI", i % 2);
|
||||
continue;
|
||||
}
|
||||
|
||||
pdev = platform_device_alloc(reg->name, id++);
|
||||
if (!pdev) {
|
||||
|
@ -1057,17 +1068,9 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
|
|||
goto err_register;
|
||||
}
|
||||
|
||||
pdev->dev.of_node = of_node;
|
||||
pdev->dev.parent = dev;
|
||||
|
||||
/* Associate subdevice with the corresponding port node */
|
||||
pdev->dev.of_node = of_graph_get_port_by_id(dev->of_node, i);
|
||||
if (!pdev->dev.of_node) {
|
||||
dev_err(dev, "missing port@%d node in %s\n", i,
|
||||
dev->of_node->full_name);
|
||||
ret = -ENODEV;
|
||||
goto err_register;
|
||||
}
|
||||
|
||||
ret = platform_device_add_data(pdev, ®->pdata,
|
||||
sizeof(reg->pdata));
|
||||
if (!ret)
|
||||
|
@ -1289,10 +1292,6 @@ static int ipu_probe(struct platform_device *pdev)
|
|||
ipu->irq_sync = irq_sync;
|
||||
ipu->irq_err = irq_err;
|
||||
|
||||
ret = ipu_irq_init(ipu);
|
||||
if (ret)
|
||||
goto out_failed_irq;
|
||||
|
||||
ret = device_reset(&pdev->dev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to reset: %d\n", ret);
|
||||
|
@ -1302,6 +1301,10 @@ static int ipu_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
goto out_failed_reset;
|
||||
|
||||
ret = ipu_irq_init(ipu);
|
||||
if (ret)
|
||||
goto out_failed_irq;
|
||||
|
||||
/* Set MCU_T to divide MCU access window into 2 */
|
||||
ipu_cm_write(ipu, 0x00400000L | (IPU_MCU_T_DEFAULT << 18),
|
||||
IPU_DISP_GEN);
|
||||
|
@ -1324,9 +1327,9 @@ static int ipu_probe(struct platform_device *pdev)
|
|||
failed_add_clients:
|
||||
ipu_submodules_exit(ipu);
|
||||
failed_submodules_init:
|
||||
out_failed_reset:
|
||||
ipu_irq_exit(ipu);
|
||||
out_failed_irq:
|
||||
out_failed_reset:
|
||||
clk_disable_unprepare(ipu->clk);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue