Skip to content

Commit 8ff7720

Browse files
committed
Merge tag 'drm-fixes-for-4.8-rc7' of git://people.freedesktop.org/~airlied/linux
Pull exynos and one stable ABI fix from Dave Airlie: "One important drm 32/64 ABI fix came in so I'll dequeue what I have, the rest is just exynos runtime pm fixes, but the net removal of code seems like a win to me. I'm going to be sporadic this week due to school holidays, so if anything urgent turns up, Daniel will take care of it" * tag 'drm-fixes-for-4.8-rc7' of git://people.freedesktop.org/~airlied/linux: drm: Only use compat ioctl for addfb2 on X86/IA64 Subject: [PATCH, RESEND] drm: exynos: avoid unused function warning drm/exynos: g2d: fix system and runtime pm integration drm/exynos: rotator: fix system and runtime pm integration drm/exynos: gsc: fix system and runtime pm integration drm/exynos: fimc: fix system and runtime pm integration exynos-drm: Fix unsupported GEM memory type error message to be clear
2 parents 6732666 + 47a66e4 commit 8ff7720

File tree

6 files changed

+22
-107
lines changed

6 files changed

+22
-107
lines changed

drivers/gpu/drm/drm_ioc32.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,7 @@ static int compat_drm_wait_vblank(struct file *file, unsigned int cmd,
10151015
return 0;
10161016
}
10171017

1018+
#if defined(CONFIG_X86) || defined(CONFIG_IA64)
10181019
typedef struct drm_mode_fb_cmd232 {
10191020
u32 fb_id;
10201021
u32 width;
@@ -1071,6 +1072,7 @@ static int compat_drm_mode_addfb2(struct file *file, unsigned int cmd,
10711072

10721073
return 0;
10731074
}
1075+
#endif
10741076

10751077
static drm_ioctl_compat_t *drm_compat_ioctls[] = {
10761078
[DRM_IOCTL_NR(DRM_IOCTL_VERSION32)] = compat_drm_version,
@@ -1104,7 +1106,9 @@ static drm_ioctl_compat_t *drm_compat_ioctls[] = {
11041106
[DRM_IOCTL_NR(DRM_IOCTL_UPDATE_DRAW32)] = compat_drm_update_draw,
11051107
#endif
11061108
[DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK32)] = compat_drm_wait_vblank,
1109+
#if defined(CONFIG_X86) || defined(CONFIG_IA64)
11071110
[DRM_IOCTL_NR(DRM_IOCTL_MODE_ADDFB232)] = compat_drm_mode_addfb2,
1111+
#endif
11081112
};
11091113

11101114
/**

drivers/gpu/drm/exynos/exynos_drm_fb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ static int check_fb_gem_memory_type(struct drm_device *drm_dev,
5555
flags = exynos_gem->flags;
5656

5757
/*
58-
* without iommu support, not support physically non-continuous memory
59-
* for framebuffer.
58+
* Physically non-contiguous memory type for framebuffer is not
59+
* supported without IOMMU.
6060
*/
6161
if (IS_NONCONTIG_BUFFER(flags)) {
62-
DRM_ERROR("cannot use this gem memory type for fb.\n");
62+
DRM_ERROR("Non-contiguous GEM memory is not supported.\n");
6363
return -EINVAL;
6464
}
6565

drivers/gpu/drm/exynos/exynos_drm_fimc.c

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,32 +1753,6 @@ static int fimc_clk_ctrl(struct fimc_context *ctx, bool enable)
17531753
return 0;
17541754
}
17551755

1756-
#ifdef CONFIG_PM_SLEEP
1757-
static int fimc_suspend(struct device *dev)
1758-
{
1759-
struct fimc_context *ctx = get_fimc_context(dev);
1760-
1761-
DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1762-
1763-
if (pm_runtime_suspended(dev))
1764-
return 0;
1765-
1766-
return fimc_clk_ctrl(ctx, false);
1767-
}
1768-
1769-
static int fimc_resume(struct device *dev)
1770-
{
1771-
struct fimc_context *ctx = get_fimc_context(dev);
1772-
1773-
DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1774-
1775-
if (!pm_runtime_suspended(dev))
1776-
return fimc_clk_ctrl(ctx, true);
1777-
1778-
return 0;
1779-
}
1780-
#endif
1781-
17821756
static int fimc_runtime_suspend(struct device *dev)
17831757
{
17841758
struct fimc_context *ctx = get_fimc_context(dev);
@@ -1799,7 +1773,8 @@ static int fimc_runtime_resume(struct device *dev)
17991773
#endif
18001774

18011775
static const struct dev_pm_ops fimc_pm_ops = {
1802-
SET_SYSTEM_SLEEP_PM_OPS(fimc_suspend, fimc_resume)
1776+
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
1777+
pm_runtime_force_resume)
18031778
SET_RUNTIME_PM_OPS(fimc_runtime_suspend, fimc_runtime_resume, NULL)
18041779
};
18051780

drivers/gpu/drm/exynos/exynos_drm_g2d.c

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,8 +1475,8 @@ static int g2d_remove(struct platform_device *pdev)
14751475
return 0;
14761476
}
14771477

1478-
#ifdef CONFIG_PM_SLEEP
1479-
static int g2d_suspend(struct device *dev)
1478+
#ifdef CONFIG_PM
1479+
static int g2d_runtime_suspend(struct device *dev)
14801480
{
14811481
struct g2d_data *g2d = dev_get_drvdata(dev);
14821482

@@ -1490,25 +1490,6 @@ static int g2d_suspend(struct device *dev)
14901490

14911491
flush_work(&g2d->runqueue_work);
14921492

1493-
return 0;
1494-
}
1495-
1496-
static int g2d_resume(struct device *dev)
1497-
{
1498-
struct g2d_data *g2d = dev_get_drvdata(dev);
1499-
1500-
g2d->suspended = false;
1501-
g2d_exec_runqueue(g2d);
1502-
1503-
return 0;
1504-
}
1505-
#endif
1506-
1507-
#ifdef CONFIG_PM
1508-
static int g2d_runtime_suspend(struct device *dev)
1509-
{
1510-
struct g2d_data *g2d = dev_get_drvdata(dev);
1511-
15121493
clk_disable_unprepare(g2d->gate_clk);
15131494

15141495
return 0;
@@ -1523,12 +1504,16 @@ static int g2d_runtime_resume(struct device *dev)
15231504
if (ret < 0)
15241505
dev_warn(dev, "failed to enable clock.\n");
15251506

1507+
g2d->suspended = false;
1508+
g2d_exec_runqueue(g2d);
1509+
15261510
return ret;
15271511
}
15281512
#endif
15291513

15301514
static const struct dev_pm_ops g2d_pm_ops = {
1531-
SET_SYSTEM_SLEEP_PM_OPS(g2d_suspend, g2d_resume)
1515+
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
1516+
pm_runtime_force_resume)
15321517
SET_RUNTIME_PM_OPS(g2d_runtime_suspend, g2d_runtime_resume, NULL)
15331518
};
15341519

drivers/gpu/drm/exynos/exynos_drm_gsc.c

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,34 +1760,7 @@ static int gsc_remove(struct platform_device *pdev)
17601760
return 0;
17611761
}
17621762

1763-
#ifdef CONFIG_PM_SLEEP
1764-
static int gsc_suspend(struct device *dev)
1765-
{
1766-
struct gsc_context *ctx = get_gsc_context(dev);
1767-
1768-
DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1769-
1770-
if (pm_runtime_suspended(dev))
1771-
return 0;
1772-
1773-
return gsc_clk_ctrl(ctx, false);
1774-
}
1775-
1776-
static int gsc_resume(struct device *dev)
1777-
{
1778-
struct gsc_context *ctx = get_gsc_context(dev);
1779-
1780-
DRM_DEBUG_KMS("id[%d]\n", ctx->id);
1781-
1782-
if (!pm_runtime_suspended(dev))
1783-
return gsc_clk_ctrl(ctx, true);
1784-
1785-
return 0;
1786-
}
1787-
#endif
1788-
1789-
#ifdef CONFIG_PM
1790-
static int gsc_runtime_suspend(struct device *dev)
1763+
static int __maybe_unused gsc_runtime_suspend(struct device *dev)
17911764
{
17921765
struct gsc_context *ctx = get_gsc_context(dev);
17931766

@@ -1796,18 +1769,18 @@ static int gsc_runtime_suspend(struct device *dev)
17961769
return gsc_clk_ctrl(ctx, false);
17971770
}
17981771

1799-
static int gsc_runtime_resume(struct device *dev)
1772+
static int __maybe_unused gsc_runtime_resume(struct device *dev)
18001773
{
18011774
struct gsc_context *ctx = get_gsc_context(dev);
18021775

18031776
DRM_DEBUG_KMS("id[%d]\n", ctx->id);
18041777

18051778
return gsc_clk_ctrl(ctx, true);
18061779
}
1807-
#endif
18081780

18091781
static const struct dev_pm_ops gsc_pm_ops = {
1810-
SET_SYSTEM_SLEEP_PM_OPS(gsc_suspend, gsc_resume)
1782+
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
1783+
pm_runtime_force_resume)
18111784
SET_RUNTIME_PM_OPS(gsc_runtime_suspend, gsc_runtime_resume, NULL)
18121785
};
18131786

drivers/gpu/drm/exynos/exynos_drm_rotator.c

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -794,29 +794,6 @@ static int rotator_clk_crtl(struct rot_context *rot, bool enable)
794794
return 0;
795795
}
796796

797-
798-
#ifdef CONFIG_PM_SLEEP
799-
static int rotator_suspend(struct device *dev)
800-
{
801-
struct rot_context *rot = dev_get_drvdata(dev);
802-
803-
if (pm_runtime_suspended(dev))
804-
return 0;
805-
806-
return rotator_clk_crtl(rot, false);
807-
}
808-
809-
static int rotator_resume(struct device *dev)
810-
{
811-
struct rot_context *rot = dev_get_drvdata(dev);
812-
813-
if (!pm_runtime_suspended(dev))
814-
return rotator_clk_crtl(rot, true);
815-
816-
return 0;
817-
}
818-
#endif
819-
820797
static int rotator_runtime_suspend(struct device *dev)
821798
{
822799
struct rot_context *rot = dev_get_drvdata(dev);
@@ -833,7 +810,8 @@ static int rotator_runtime_resume(struct device *dev)
833810
#endif
834811

835812
static const struct dev_pm_ops rotator_pm_ops = {
836-
SET_SYSTEM_SLEEP_PM_OPS(rotator_suspend, rotator_resume)
813+
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
814+
pm_runtime_force_resume)
837815
SET_RUNTIME_PM_OPS(rotator_runtime_suspend, rotator_runtime_resume,
838816
NULL)
839817
};

0 commit comments

Comments
 (0)