summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/starfive
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/starfive')
-rw-r--r--drivers/gpu/drm/starfive/Kconfig1
-rw-r--r--drivers/gpu/drm/starfive/starfive_drm_crtc.c2
-rw-r--r--drivers/gpu/drm/starfive/starfive_drm_drv.c11
-rw-r--r--drivers/gpu/drm/starfive/starfive_drm_encoder.c2
-rw-r--r--drivers/gpu/drm/starfive/starfive_drm_plane.c3
5 files changed, 11 insertions, 8 deletions
diff --git a/drivers/gpu/drm/starfive/Kconfig b/drivers/gpu/drm/starfive/Kconfig
index 99181d43c8f0..62e245156562 100644
--- a/drivers/gpu/drm/starfive/Kconfig
+++ b/drivers/gpu/drm/starfive/Kconfig
@@ -6,6 +6,7 @@ config DRM_STARFIVE
depends on DRM
depends on SIFIVE_CCACHE && RISCV_NONSTANDARD_CACHE_OPS
depends on SOC_STARFIVE || COMPILE_TEST
+ select DRM_CLIENT_SELECTION
select DRM_GEM_DMA_HELPER
select DRM_KMS_HELPER
select DRM_MIPI_DSI
diff --git a/drivers/gpu/drm/starfive/starfive_drm_crtc.c b/drivers/gpu/drm/starfive/starfive_drm_crtc.c
index 1f1e79bfbd0f..0cee7f54d5f7 100644
--- a/drivers/gpu/drm/starfive/starfive_drm_crtc.c
+++ b/drivers/gpu/drm/starfive/starfive_drm_crtc.c
@@ -503,7 +503,7 @@ static void starfive_crtc_remove(struct platform_device *pdev)
struct platform_driver starfive_crtc_driver = {
.probe = starfive_crtc_probe,
- .remove_new = starfive_crtc_remove,
+ .remove = starfive_crtc_remove,
.driver = {
.name = "starfive-crtc",
.of_match_table = of_match_ptr(starfive_crtc_driver_dt_match),
diff --git a/drivers/gpu/drm/starfive/starfive_drm_drv.c b/drivers/gpu/drm/starfive/starfive_drm_drv.c
index 5e0207b74022..9bffcfe0cdfd 100644
--- a/drivers/gpu/drm/starfive/starfive_drm_drv.c
+++ b/drivers/gpu/drm/starfive/starfive_drm_drv.c
@@ -10,6 +10,7 @@
#include <linux/pm_runtime.h>
#include <linux/soc/mediatek/mtk-mmsys.h>
#include <linux/dma-mapping.h>
+#include <drm/clients/drm_client_setup.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_drv.h>
@@ -26,7 +27,6 @@
#define DRIVER_NAME "starfive"
#define DRIVER_DESC "starfive Soc DRM"
-#define DRIVER_DATE "20210519"
#define DRIVER_MAJOR 1
#define DRIVER_MINOR 0
@@ -56,16 +56,17 @@ static const struct file_operations starfive_drm_driver_fops = {
.unlocked_ioctl = drm_ioctl,
.compat_ioctl = drm_compat_ioctl,
.release = drm_release,
+ .fop_flags = FOP_UNSIGNED_OFFSET,
};
static struct drm_driver starfive_drm_driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
- .dumb_create = starfive_drm_gem_dumb_create,
+ DRM_GEM_DMA_DRIVER_OPS_WITH_DUMB_CREATE(starfive_drm_gem_dumb_create),
+ DRM_FBDEV_DMA_DRIVER_OPS,
.gem_prime_import_sg_table = starfive_drm_gem_prime_import_sg_table,
.fops = &starfive_drm_driver_fops,
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
- .date = DRIVER_DATE,
.major = DRIVER_MAJOR,
.minor = DRIVER_MINOR,
};
@@ -168,7 +169,7 @@ static int starfive_drm_bind(struct device *dev)
if (ret)
goto err_cleanup;
#ifdef CONFIG_FRAMEBUFFER_CONSOLE
- drm_fbdev_dma_setup(drm_dev, 16);
+ drm_client_setup_with_fourcc(drm_dev, DRM_FORMAT_RGB565);
#endif
return 0;
@@ -226,7 +227,7 @@ MODULE_DEVICE_TABLE(of, starfive_drm_dt_ids);
static struct platform_driver starfive_drm_platform_driver = {
.probe = starfive_drm_probe,
- .remove_new = starfive_drm_remove,
+ .remove = starfive_drm_remove,
.driver = {
.name = "starfive-drm",
.of_match_table = starfive_drm_dt_ids,
diff --git a/drivers/gpu/drm/starfive/starfive_drm_encoder.c b/drivers/gpu/drm/starfive/starfive_drm_encoder.c
index 337c50d02529..0bd5f752fba2 100644
--- a/drivers/gpu/drm/starfive/starfive_drm_encoder.c
+++ b/drivers/gpu/drm/starfive/starfive_drm_encoder.c
@@ -120,7 +120,7 @@ static void starfive_encoder_remove(struct platform_device *pdev)
struct platform_driver starfive_encoder_driver = {
.probe = starfive_encoder_probe,
- .remove_new = starfive_encoder_remove,
+ .remove = starfive_encoder_remove,
.driver = {
.name = "display-encoder",
.of_match_table = of_match_ptr(starfive_encoder_driver_dt_match),
diff --git a/drivers/gpu/drm/starfive/starfive_drm_plane.c b/drivers/gpu/drm/starfive/starfive_drm_plane.c
index 7ee1d3576211..c21251dcfc05 100644
--- a/drivers/gpu/drm/starfive/starfive_drm_plane.c
+++ b/drivers/gpu/drm/starfive/starfive_drm_plane.c
@@ -139,7 +139,8 @@ static void starfive_plane_atomic_update(struct drm_plane *plane,
}
static int starfive_plane_atomic_async_check(struct drm_plane *plane,
- struct drm_atomic_state *state)
+ struct drm_atomic_state *state,
+ bool flip)
{
struct drm_crtc_state *crtc_state;
struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,