Skip to content

Commit 7f5ec14

Browse files
committed
Merge tag 'drm-misc-fixes-2022-07-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
A scheduling-while-atomic fix for drm/scheduler, a locking fix for TTM, a typo fix for panel-edp and a resource removal fix for imx/dcss Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220721085550.hrwbukj34y56rzva@houat
2 parents 1c46f3c + 02c87df commit 7f5ec14

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

drivers/gpu/drm/drm_gem_ttm_helper.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,13 @@ int drm_gem_ttm_vmap(struct drm_gem_object *gem,
6464
struct iosys_map *map)
6565
{
6666
struct ttm_buffer_object *bo = drm_gem_ttm_of_gem(gem);
67+
int ret;
68+
69+
dma_resv_lock(gem->resv, NULL);
70+
ret = ttm_bo_vmap(bo, map);
71+
dma_resv_unlock(gem->resv);
6772

68-
return ttm_bo_vmap(bo, map);
73+
return ret;
6974
}
7075
EXPORT_SYMBOL(drm_gem_ttm_vmap);
7176

@@ -82,7 +87,9 @@ void drm_gem_ttm_vunmap(struct drm_gem_object *gem,
8287
{
8388
struct ttm_buffer_object *bo = drm_gem_ttm_of_gem(gem);
8489

90+
dma_resv_lock(gem->resv, NULL);
8591
ttm_bo_vunmap(bo, map);
92+
dma_resv_unlock(gem->resv);
8693
}
8794
EXPORT_SYMBOL(drm_gem_ttm_vunmap);
8895

drivers/gpu/drm/imx/dcss/dcss-dev.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ struct dcss_dev *dcss_dev_create(struct device *dev, bool hdmi_output)
207207

208208
ret = dcss_submodules_init(dcss);
209209
if (ret) {
210+
of_node_put(dcss->of_port);
210211
dev_err(dev, "submodules initialization failed\n");
211212
goto clks_err;
212213
}
@@ -237,6 +238,8 @@ void dcss_dev_destroy(struct dcss_dev *dcss)
237238
dcss_clocks_disable(dcss);
238239
}
239240

241+
of_node_put(dcss->of_port);
242+
240243
pm_runtime_disable(dcss->dev);
241244

242245
dcss_submodules_stop(dcss);

drivers/gpu/drm/panel/panel-edp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ static int generic_edp_panel_probe(struct device *dev, struct panel_edp *panel)
713713
of_property_read_u32(dev->of_node, "hpd-reliable-delay-ms", &reliable_ms);
714714
desc->delay.hpd_reliable = reliable_ms;
715715
of_property_read_u32(dev->of_node, "hpd-absent-delay-ms", &absent_ms);
716-
desc->delay.hpd_reliable = absent_ms;
716+
desc->delay.hpd_absent = absent_ms;
717717

718718
/* Power the panel on so we can read the EDID */
719719
ret = pm_runtime_get_sync(dev);

drivers/gpu/drm/scheduler/sched_entity.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ long drm_sched_entity_flush(struct drm_sched_entity *entity, long timeout)
190190
}
191191
EXPORT_SYMBOL(drm_sched_entity_flush);
192192

193-
static void drm_sched_entity_kill_jobs_irq_work(struct irq_work *wrk)
193+
static void drm_sched_entity_kill_jobs_work(struct work_struct *wrk)
194194
{
195195
struct drm_sched_job *job = container_of(wrk, typeof(*job), work);
196196

@@ -207,8 +207,8 @@ static void drm_sched_entity_kill_jobs_cb(struct dma_fence *f,
207207
struct drm_sched_job *job = container_of(cb, struct drm_sched_job,
208208
finish_cb);
209209

210-
init_irq_work(&job->work, drm_sched_entity_kill_jobs_irq_work);
211-
irq_work_queue(&job->work);
210+
INIT_WORK(&job->work, drm_sched_entity_kill_jobs_work);
211+
schedule_work(&job->work);
212212
}
213213

214214
static struct dma_fence *

include/drm/gpu_scheduler.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <linux/dma-fence.h>
2929
#include <linux/completion.h>
3030
#include <linux/xarray.h>
31-
#include <linux/irq_work.h>
31+
#include <linux/workqueue.h>
3232

3333
#define MAX_WAIT_SCHED_ENTITY_Q_EMPTY msecs_to_jiffies(1000)
3434

@@ -295,7 +295,7 @@ struct drm_sched_job {
295295
*/
296296
union {
297297
struct dma_fence_cb finish_cb;
298-
struct irq_work work;
298+
struct work_struct work;
299299
};
300300

301301
uint64_t id;

0 commit comments

Comments
 (0)