mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 22:46:42 +07:00
drm/exynos: fimd: check error status for drm_iommu_attach_device
check error status for drm_iommu_attach_device() and make sure it propagates till the caller. Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> Signed-off-by: Inki Dae <daeinki@gmail.com>
This commit is contained in:
parent
adf5691c33
commit
efa75bcdad
@ -296,12 +296,19 @@ static int fimd_ctx_initialize(struct fimd_context *ctx,
|
|||||||
|
|
||||||
/* attach this sub driver to iommu mapping if supported. */
|
/* attach this sub driver to iommu mapping if supported. */
|
||||||
if (is_drm_iommu_supported(ctx->drm_dev)) {
|
if (is_drm_iommu_supported(ctx->drm_dev)) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If any channel is already active, iommu will throw
|
* If any channel is already active, iommu will throw
|
||||||
* a PAGE FAULT when enabled. So clear any channel if enabled.
|
* a PAGE FAULT when enabled. So clear any channel if enabled.
|
||||||
*/
|
*/
|
||||||
fimd_clear_channel(ctx->crtc);
|
fimd_clear_channel(ctx->crtc);
|
||||||
drm_iommu_attach_device(ctx->drm_dev, ctx->dev);
|
ret = drm_iommu_attach_device(ctx->drm_dev, ctx->dev);
|
||||||
|
if (ret) {
|
||||||
|
DRM_ERROR("drm_iommu_attach failed.\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1056,6 +1063,7 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
|
|||||||
{
|
{
|
||||||
struct fimd_context *ctx = dev_get_drvdata(dev);
|
struct fimd_context *ctx = dev_get_drvdata(dev);
|
||||||
struct drm_device *drm_dev = data;
|
struct drm_device *drm_dev = data;
|
||||||
|
int ret;
|
||||||
|
|
||||||
ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
|
ctx->crtc = exynos_drm_crtc_create(drm_dev, ctx->pipe,
|
||||||
EXYNOS_DISPLAY_TYPE_LCD,
|
EXYNOS_DISPLAY_TYPE_LCD,
|
||||||
@ -1063,7 +1071,12 @@ static int fimd_bind(struct device *dev, struct device *master, void *data)
|
|||||||
if (IS_ERR(ctx->crtc))
|
if (IS_ERR(ctx->crtc))
|
||||||
return PTR_ERR(ctx->crtc);
|
return PTR_ERR(ctx->crtc);
|
||||||
|
|
||||||
fimd_ctx_initialize(ctx, drm_dev);
|
ret = fimd_ctx_initialize(ctx, drm_dev);
|
||||||
|
if (ret) {
|
||||||
|
DRM_ERROR("fimd_ctx_initialize failed.\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ctx->display)
|
if (ctx->display)
|
||||||
exynos_drm_create_enc_conn(drm_dev, ctx->display);
|
exynos_drm_create_enc_conn(drm_dev, ctx->display);
|
||||||
|
Loading…
Reference in New Issue
Block a user