Skip to content

Commit

Permalink
Merge tag 'drm-misc-fixes-2025-02-20' of https://gitlab.freedesktop.o…
Browse files Browse the repository at this point in the history
…rg/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 <[email protected]>

From: Maxime Ripard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20250220-glorious-cockle-of-might-5b35f7@houat
  • Loading branch information
airlied committed Feb 20, 2025
2 parents 0ad2507 + 838c17f commit 395436f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 48 deletions.
2 changes: 0 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7425,7 +7425,6 @@ F: Documentation/devicetree/bindings/display/panel/novatek,nt36672a.yaml
F: drivers/gpu/drm/panel/panel-novatek-nt36672a.c

DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS
M: Karol Herbst <[email protected]>
M: Lyude Paul <[email protected]>
M: Danilo Krummrich <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -24064,7 +24063,6 @@ F: tools/testing/selftests/ftrace/
TRACING MMIO ACCESSES (MMIOTRACE)
M: Steven Rostedt <[email protected]>
M: Masami Hiramatsu <[email protected]>
R: Karol Herbst <[email protected]>
R: Pekka Paalanen <[email protected]>
L: [email protected]
L: [email protected]
Expand Down
1 change: 1 addition & 0 deletions drivers/accel/amdxdna/amdxdna_mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <linux/bitfield.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/slab.h>
#include <linux/xarray.h>

#define CREATE_TRACE_POINTS
Expand Down
9 changes: 7 additions & 2 deletions drivers/gpu/drm/nouveau/nouveau_svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ static int nouveau_atomic_range_fault(struct nouveau_svmm *svmm,
unsigned long timeout =
jiffies + msecs_to_jiffies(HMM_RANGE_DEFAULT_TIMEOUT);
struct mm_struct *mm = svmm->notifier.mm;
struct folio *folio;
struct page *page;
unsigned long start = args->p.addr;
unsigned long notifier_seq;
Expand All @@ -616,12 +617,16 @@ static int nouveau_atomic_range_fault(struct nouveau_svmm *svmm,
ret = -EINVAL;
goto out;
}
folio = page_folio(page);

mutex_lock(&svmm->mutex);
if (!mmu_interval_read_retry(&notifier->notifier,
notifier_seq))
break;
mutex_unlock(&svmm->mutex);

folio_unlock(folio);
folio_put(folio);
}

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

unlock_page(page);
put_page(page);
folio_unlock(folio);
folio_put(folio);

out:
mmu_interval_notifier_remove(&notifier->notifier);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ gp10b_pmu_acr = {
.bootstrap_multiple_falcons = gp10b_pmu_acr_bootstrap_multiple_falcons,
};

#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC)
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
MODULE_FIRMWARE("nvidia/gp10b/pmu/desc.bin");
MODULE_FIRMWARE("nvidia/gp10b/pmu/image.bin");
MODULE_FIRMWARE("nvidia/gp10b/pmu/sig.bin");
Expand Down
8 changes: 4 additions & 4 deletions drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ static int jadard_prepare(struct drm_panel *panel)
if (jadard->desc->lp11_to_reset_delay_ms)
msleep(jadard->desc->lp11_to_reset_delay_ms);

gpiod_set_value(jadard->reset, 1);
gpiod_set_value(jadard->reset, 0);
msleep(5);

gpiod_set_value(jadard->reset, 0);
gpiod_set_value(jadard->reset, 1);
msleep(10);

gpiod_set_value(jadard->reset, 1);
gpiod_set_value(jadard->reset, 0);
msleep(130);

ret = jadard->desc->init(jadard);
Expand Down Expand Up @@ -1130,7 +1130,7 @@ static int jadard_dsi_probe(struct mipi_dsi_device *dsi)
dsi->format = desc->format;
dsi->lanes = desc->lanes;

jadard->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
jadard->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(jadard->reset)) {
DRM_DEV_ERROR(&dsi->dev, "failed to get our reset GPIO\n");
return PTR_ERR(jadard->reset);
Expand Down
50 changes: 11 additions & 39 deletions kernel/cgroup/dmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,60 +220,32 @@ dmem_cgroup_calculate_protection(struct dmem_cgroup_pool_state *limit_pool,
struct dmem_cgroup_pool_state *test_pool)
{
struct page_counter *climit;
struct cgroup_subsys_state *css, *next_css;
struct cgroup_subsys_state *css;
struct dmemcg_state *dmemcg_iter;
struct dmem_cgroup_pool_state *pool, *parent_pool;
bool found_descendant;
struct dmem_cgroup_pool_state *pool, *found_pool;

climit = &limit_pool->cnt;

rcu_read_lock();
parent_pool = pool = limit_pool;
css = &limit_pool->cs->css;

/*
* This logic is roughly equivalent to css_foreach_descendant_pre,
* except we also track the parent pool to find out which pool we need
* to calculate protection values for.
*
* We can stop the traversal once we find test_pool among the
* descendants since we don't really care about any others.
*/
while (pool != test_pool) {
next_css = css_next_child(NULL, css);
if (next_css) {
parent_pool = pool;
} else {
while (css != &limit_pool->cs->css) {
next_css = css_next_child(css, css->parent);
if (next_css)
break;
css = css->parent;
parent_pool = pool_parent(parent_pool);
}
/*
* We can only hit this when test_pool is not a
* descendant of limit_pool.
*/
if (WARN_ON_ONCE(css == &limit_pool->cs->css))
break;
}
css = next_css;

found_descendant = false;
css_for_each_descendant_pre(css, &limit_pool->cs->css) {
dmemcg_iter = container_of(css, struct dmemcg_state, css);
found_pool = NULL;

list_for_each_entry_rcu(pool, &dmemcg_iter->pools, css_node) {
if (pool_parent(pool) == parent_pool) {
found_descendant = true;
if (pool->region == limit_pool->region) {
found_pool = pool;
break;
}
}
if (!found_descendant)
if (!found_pool)
continue;

page_counter_calculate_protection(
climit, &pool->cnt, true);
climit, &found_pool->cnt, true);

if (found_pool == test_pool)
break;
}
rcu_read_unlock();
}
Expand Down

0 comments on commit 395436f

Please sign in to comment.