Tagging commit at head of panfrost fixes (+ rockchip fix) that need to go into
-misc-next-fixes. Signed-off-by: Sean Paul <seanpaul@chromium.org> -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfxcpfMSgdnQMs+QqlvcN/ahKBwoFAlzMmCIACgkQlvcN/ahK BwqHEwf+LNISngz8pjHWljiaOQGfMHhE2LHR55C4ncF8bFUD82k7zVwxEm0Ls7b9 xnmoGGTnG46viUoZDcZsWcy/BkEYbEQ7aTsaexDJ1w9SeMDh0OKrlPlsSJjKXDGL mUM8zVaRnKuFCwTmh3O0GPLV2iNyTwjPiIXBwcif2/ZLWpCrzwZqv4bgiiSo+eOD +12qL9h+MdlTWXvLCroMe44o2QNnKukkkGUAaT/oQloJPhe8hzEU9WloY+5VgGaH IZ0mPcDz5QjU6OflmHrH6XSpcp5UdRsgks7ws9+zdACiPeS/XNgpnqPSIi/EXGtK vgIkSe0SAFH87iRihjN+5bHEhK9fug== =c8P8 -----END PGP SIGNATURE----- Merge panfrost-fixes into drm-misc-next-fixes Merging some panfrost fixes as well as one rockchip fix that _just_ missed feature freeze. Signed-off-by: Sean Paul <seanpaul@chromium.org>
This commit is contained in:
commit
ae677a6710
|
@ -3,7 +3,7 @@
|
|||
config DRM_PANFROST
|
||||
tristate "Panfrost (DRM support for ARM Mali Midgard/Bifrost GPUs)"
|
||||
depends on DRM
|
||||
depends on ARM || ARM64 || COMPILE_TEST
|
||||
depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
|
||||
depends on MMU
|
||||
select DRM_SCHED
|
||||
select IOMMU_SUPPORT
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <linux/regulator/consumer.h>
|
||||
|
||||
#include "panfrost_device.h"
|
||||
#include "panfrost_devfreq.h"
|
||||
#include "panfrost_features.h"
|
||||
#include "panfrost_issues.h"
|
||||
#include "panfrost_gpu.h"
|
||||
|
|
|
@ -98,6 +98,7 @@ int panfrost_device_init(struct panfrost_device *pfdev)
|
|||
struct resource *res;
|
||||
|
||||
mutex_init(&pfdev->sched_lock);
|
||||
mutex_init(&pfdev->reset_lock);
|
||||
INIT_LIST_HEAD(&pfdev->scheduled_jobs);
|
||||
|
||||
spin_lock_init(&pfdev->hwaccess_lock);
|
||||
|
|
|
@ -78,6 +78,7 @@ struct panfrost_device {
|
|||
struct list_head scheduled_jobs;
|
||||
|
||||
struct mutex sched_lock;
|
||||
struct mutex reset_lock;
|
||||
|
||||
struct {
|
||||
struct devfreq *devfreq;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
/* Called DRM core on the last userspace/kernel unreference of the
|
||||
* BO.
|
||||
*/
|
||||
void panfrost_gem_free_object(struct drm_gem_object *obj)
|
||||
static void panfrost_gem_free_object(struct drm_gem_object *obj)
|
||||
{
|
||||
struct panfrost_gem_object *bo = to_panfrost_bo(obj);
|
||||
struct panfrost_device *pfdev = obj->dev->dev_private;
|
||||
|
|
|
@ -384,6 +384,8 @@ static void panfrost_job_timedout(struct drm_sched_job *sched_job)
|
|||
job_read(pfdev, JS_TAIL_LO(js)),
|
||||
sched_job);
|
||||
|
||||
mutex_lock(&pfdev->reset_lock);
|
||||
|
||||
for (i = 0; i < NUM_JOB_SLOTS; i++)
|
||||
drm_sched_stop(&pfdev->js->queue[i].sched);
|
||||
|
||||
|
@ -406,6 +408,8 @@ static void panfrost_job_timedout(struct drm_sched_job *sched_job)
|
|||
/* restart scheduler after GPU is usable again */
|
||||
for (i = 0; i < NUM_JOB_SLOTS; i++)
|
||||
drm_sched_start(&pfdev->js->queue[i].sched, true);
|
||||
|
||||
mutex_unlock(&pfdev->reset_lock);
|
||||
}
|
||||
|
||||
static const struct drm_sched_backend_ops panfrost_sched_ops = {
|
||||
|
|
|
@ -448,6 +448,14 @@ static int rockchip_drm_platform_remove(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct drm_device *drm = platform_get_drvdata(pdev);
|
||||
|
||||
if (drm)
|
||||
drm_atomic_helper_shutdown(drm);
|
||||
}
|
||||
|
||||
static const struct of_device_id rockchip_drm_dt_ids[] = {
|
||||
{ .compatible = "rockchip,display-subsystem", },
|
||||
{ /* sentinel */ },
|
||||
|
@ -457,6 +465,7 @@ MODULE_DEVICE_TABLE(of, rockchip_drm_dt_ids);
|
|||
static struct platform_driver rockchip_drm_platform_driver = {
|
||||
.probe = rockchip_drm_platform_probe,
|
||||
.remove = rockchip_drm_platform_remove,
|
||||
.shutdown = rockchip_drm_platform_shutdown,
|
||||
.driver = {
|
||||
.name = "rockchip-drm",
|
||||
.of_match_table = rockchip_drm_dt_ids,
|
||||
|
|
Loading…
Reference in New Issue