Skip to content

Commit 395436f

Browse files
committed
Merge tag 'drm-misc-fixes-2025-02-20' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
An reset signal polarity fix for the jd9365da-h3 panel, a folio handling fix and config fix in nouveau, a dmem cgroup descendant pool handling fix, and a missing header for amdxdna. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <mripard@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250220-glorious-cockle-of-might-5b35f7@houat
2 parents 0ad2507 + 838c17f commit 395436f

File tree

6 files changed

+24
-48
lines changed

6 files changed

+24
-48
lines changed

MAINTAINERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7425,7 +7425,6 @@ F: Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml
74257425
F: drivers/gpu/drm/panel/panel-novatek-nt36672a.c
74267426

74277427
DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS
7428-
M: Karol Herbst <kherbst@redhat.com>
74297428
M: Lyude Paul <lyude@redhat.com>
74307429
M: Danilo Krummrich <dakr@kernel.org>
74317430
L: dri-devel@lists.freedesktop.org
@@ -24064,7 +24063,6 @@ F: tools/testing/selftests/ftrace/
2406424063
TRACING MMIO ACCESSES (MMIOTRACE)
2406524064
M: Steven Rostedt <rostedt@goodmis.org>
2406624065
M: Masami Hiramatsu <mhiramat@kernel.org>
24067-
R: Karol Herbst <karolherbst@gmail.com>
2406824066
R: Pekka Paalanen <ppaalanen@gmail.com>
2406924067
L: linux-kernel@vger.kernel.org
2407024068
L: nouveau@lists.freedesktop.org

drivers/accel/amdxdna/amdxdna_mailbox.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/bitfield.h>
99
#include <linux/interrupt.h>
1010
#include <linux/iopoll.h>
11+
#include <linux/slab.h>
1112
#include <linux/xarray.h>
1213

1314
#define CREATE_TRACE_POINTS

drivers/gpu/drm/nouveau/nouveau_svm.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ static int nouveau_atomic_range_fault(struct nouveau_svmm *svmm,
590590
unsigned long timeout =
591591
jiffies + msecs_to_jiffies(HMM_RANGE_DEFAULT_TIMEOUT);
592592
struct mm_struct *mm = svmm->notifier.mm;
593+
struct folio *folio;
593594
struct page *page;
594595
unsigned long start = args->p.addr;
595596
unsigned long notifier_seq;
@@ -616,12 +617,16 @@ static int nouveau_atomic_range_fault(struct nouveau_svmm *svmm,
616617
ret = -EINVAL;
617618
goto out;
618619
}
620+
folio = page_folio(page);
619621

620622
mutex_lock(&svmm->mutex);
621623
if (!mmu_interval_read_retry(&notifier->notifier,
622624
notifier_seq))
623625
break;
624626
mutex_unlock(&svmm->mutex);
627+
628+
folio_unlock(folio);
629+
folio_put(folio);
625630
}
626631

627632
/* Map the page on the GPU. */
@@ -637,8 +642,8 @@ static int nouveau_atomic_range_fault(struct nouveau_svmm *svmm,
637642
ret = nvif_object_ioctl(&svmm->vmm->vmm.object, args, size, NULL);
638643
mutex_unlock(&svmm->mutex);
639644

640-
unlock_page(page);
641-
put_page(page);
645+
folio_unlock(folio);
646+
folio_put(folio);
642647

643648
out:
644649
mmu_interval_notifier_remove(&notifier->notifier);

drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ gp10b_pmu_acr = {
7575
.bootstrap_multiple_falcons = gp10b_pmu_acr_bootstrap_multiple_falcons,
7676
};
7777

78-
#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
78+
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
7979
MODULE_FIRMWARE("nvidia/gp10b/pmu/desc.bin");
8080
MODULE_FIRMWARE("nvidia/gp10b/pmu/image.bin");
8181
MODULE_FIRMWARE("nvidia/gp10b/pmu/sig.bin");

drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ static int jadard_prepare(struct drm_panel *panel)
109109
if (jadard->desc->lp11_to_reset_delay_ms)
110110
msleep(jadard->desc->lp11_to_reset_delay_ms);
111111

112-
gpiod_set_value(jadard->reset, 1);
112+
gpiod_set_value(jadard->reset, 0);
113113
msleep(5);
114114

115-
gpiod_set_value(jadard->reset, 0);
115+
gpiod_set_value(jadard->reset, 1);
116116
msleep(10);
117117

118-
gpiod_set_value(jadard->reset, 1);
118+
gpiod_set_value(jadard->reset, 0);
119119
msleep(130);
120120

121121
ret = jadard->desc->init(jadard);
@@ -1130,7 +1130,7 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
11301130
dsi->format = desc->format;
11311131
dsi->lanes = desc->lanes;
11321132

1133-
jadard->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
1133+
jadard->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
11341134
if (IS_ERR(jadard->reset)) {
11351135
DRM_DEV_ERROR(&dsi->dev, "failed to get our reset GPIO\n");
11361136
return PTR_ERR(jadard->reset);

kernel/cgroup/dmem.c

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -220,60 +220,32 @@ dmem_cgroup_calculate_protection(struct dmem_cgroup_pool_state *limit_pool,
220220
struct dmem_cgroup_pool_state *test_pool)
221221
{
222222
struct page_counter *climit;
223-
struct cgroup_subsys_state *css, *next_css;
223+
struct cgroup_subsys_state *css;
224224
struct dmemcg_state *dmemcg_iter;
225-
struct dmem_cgroup_pool_state *pool, *parent_pool;
226-
bool found_descendant;
225+
struct dmem_cgroup_pool_state *pool, *found_pool;
227226

228227
climit = &limit_pool->cnt;
229228

230229
rcu_read_lock();
231-
parent_pool = pool = limit_pool;
232-
css = &limit_pool->cs->css;
233230

234-
/*
235-
* This logic is roughly equivalent to css_foreach_descendant_pre,
236-
* except we also track the parent pool to find out which pool we need
237-
* to calculate protection values for.
238-
*
239-
* We can stop the traversal once we find test_pool among the
240-
* descendants since we don't really care about any others.
241-
*/
242-
while (pool != test_pool) {
243-
next_css = css_next_child(NULL, css);
244-
if (next_css) {
245-
parent_pool = pool;
246-
} else {
247-
while (css != &limit_pool->cs->css) {
248-
next_css = css_next_child(css, css->parent);
249-
if (next_css)
250-
break;
251-
css = css->parent;
252-
parent_pool = pool_parent(parent_pool);
253-
}
254-
/*
255-
* We can only hit this when test_pool is not a
256-
* descendant of limit_pool.
257-
*/
258-
if (WARN_ON_ONCE(css == &limit_pool->cs->css))
259-
break;
260-
}
261-
css = next_css;
262-
263-
found_descendant = false;
231+
css_for_each_descendant_pre(css, &limit_pool->cs->css) {
264232
dmemcg_iter = container_of(css, struct dmemcg_state, css);
233+
found_pool = NULL;
265234

266235
list_for_each_entry_rcu(pool, &dmemcg_iter->pools, css_node) {
267-
if (pool_parent(pool) == parent_pool) {
268-
found_descendant = true;
236+
if (pool->region == limit_pool->region) {
237+
found_pool = pool;
269238
break;
270239
}
271240
}
272-
if (!found_descendant)
241+
if (!found_pool)
273242
continue;
274243

275244
page_counter_calculate_protection(
276-
climit, &pool->cnt, true);
245+
climit, &found_pool->cnt, true);
246+
247+
if (found_pool == test_pool)
248+
break;
277249
}
278250
rcu_read_unlock();
279251
}

0 commit comments

Comments
 (0)