drm/amdgpu: don't register a dirty callback for non-atomic
Some asics still support non-atomic code paths.
Fixes: 66f99628eb
("drm/amdgpu: use dirty framebuffer helper")
Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
Reviewed-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
88bab90f7a
commit
abbc7a3daf
1 changed files with 10 additions and 1 deletions
|
@ -39,6 +39,7 @@
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <drm/drm_crtc_helper.h>
|
#include <drm/drm_crtc_helper.h>
|
||||||
#include <drm/drm_damage_helper.h>
|
#include <drm/drm_damage_helper.h>
|
||||||
|
#include <drm/drm_drv.h>
|
||||||
#include <drm/drm_edid.h>
|
#include <drm/drm_edid.h>
|
||||||
#include <drm/drm_gem_framebuffer_helper.h>
|
#include <drm/drm_gem_framebuffer_helper.h>
|
||||||
#include <drm/drm_fb_helper.h>
|
#include <drm/drm_fb_helper.h>
|
||||||
|
@ -497,6 +498,11 @@ bool amdgpu_display_ddc_probe(struct amdgpu_connector *amdgpu_connector,
|
||||||
static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
|
static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
|
||||||
.destroy = drm_gem_fb_destroy,
|
.destroy = drm_gem_fb_destroy,
|
||||||
.create_handle = drm_gem_fb_create_handle,
|
.create_handle = drm_gem_fb_create_handle,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct drm_framebuffer_funcs amdgpu_fb_funcs_atomic = {
|
||||||
|
.destroy = drm_gem_fb_destroy,
|
||||||
|
.create_handle = drm_gem_fb_create_handle,
|
||||||
.dirty = drm_atomic_helper_dirtyfb,
|
.dirty = drm_atomic_helper_dirtyfb,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1102,6 +1108,9 @@ static int amdgpu_display_gem_fb_verify_and_init(struct drm_device *dev,
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
|
if (drm_drv_uses_atomic_modeset(dev))
|
||||||
|
ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs_atomic);
|
||||||
|
else
|
||||||
ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs);
|
ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Loading…
Add table
Reference in a new issue