Merge tag 'drm-misc-fixes-2025-11-20' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes

Short summary of fixes pull:

atomic:
- Return error codes on failed blob creation for planes

nouveau:
- Fix memory leak

tegra:
- Fix device ref counting
- Fix pid ref counting
- Revert booting on Pixel C

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20251120151308.GA589436@linux.fritz.box
This commit is contained in:
Dave Airlie
2025-11-21 17:51:14 +10:00
5 changed files with 10 additions and 13 deletions

View File

@@ -210,7 +210,7 @@ static struct drm_property_blob *create_in_format_blob(struct drm_device *dev,
formats_size = sizeof(__u32) * plane->format_count; formats_size = sizeof(__u32) * plane->format_count;
if (WARN_ON(!formats_size)) { if (WARN_ON(!formats_size)) {
/* 0 formats are never expected */ /* 0 formats are never expected */
return 0; return ERR_PTR(-EINVAL);
} }
modifiers_size = modifiers_size =
@@ -226,7 +226,7 @@ static struct drm_property_blob *create_in_format_blob(struct drm_device *dev,
blob = drm_property_create_blob(dev, blob_size, NULL); blob = drm_property_create_blob(dev, blob_size, NULL);
if (IS_ERR(blob)) if (IS_ERR(blob))
return NULL; return blob;
blob_data = blob->data; blob_data = blob->data;
blob_data->version = FORMAT_BLOB_CURRENT; blob_data->version = FORMAT_BLOB_CURRENT;

View File

@@ -159,6 +159,8 @@ nvkm_falcon_fw_dtor(struct nvkm_falcon_fw *fw)
nvkm_memory_unref(&fw->inst); nvkm_memory_unref(&fw->inst);
nvkm_falcon_fw_dtor_sigs(fw); nvkm_falcon_fw_dtor_sigs(fw);
nvkm_firmware_dtor(&fw->fw); nvkm_firmware_dtor(&fw->fw);
kfree(fw->boot);
fw->boot = NULL;
} }
static const struct nvkm_firmware_func static const struct nvkm_firmware_func

View File

@@ -3148,6 +3148,7 @@ static int tegra_dc_couple(struct tegra_dc *dc)
dc->client.parent = &parent->client; dc->client.parent = &parent->client;
dev_dbg(dc->dev, "coupled to %s\n", dev_name(companion)); dev_dbg(dc->dev, "coupled to %s\n", dev_name(companion));
put_device(companion);
} }
return 0; return 0;

View File

@@ -913,15 +913,6 @@ static void tegra_dsi_encoder_enable(struct drm_encoder *encoder)
u32 value; u32 value;
int err; int err;
/* If the bootloader enabled DSI it needs to be disabled
* in order for the panel initialization commands to be
* properly sent.
*/
value = tegra_dsi_readl(dsi, DSI_POWER_CONTROL);
if (value & DSI_POWER_CONTROL_ENABLE)
tegra_dsi_disable(dsi);
err = tegra_dsi_prepare(dsi); err = tegra_dsi_prepare(dsi);
if (err < 0) { if (err < 0) {
dev_err(dsi->dev, "failed to prepare: %d\n", err); dev_err(dsi->dev, "failed to prepare: %d\n", err);

View File

@@ -114,9 +114,12 @@ int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data, struct drm_
if (err) if (err)
goto put_channel; goto put_channel;
if (supported) if (supported) {
struct pid *pid = get_task_pid(current, PIDTYPE_TGID);
context->memory_context = host1x_memory_context_alloc( context->memory_context = host1x_memory_context_alloc(
host, client->base.dev, get_task_pid(current, PIDTYPE_TGID)); host, client->base.dev, pid);
put_pid(pid);
}
if (IS_ERR(context->memory_context)) { if (IS_ERR(context->memory_context)) {
if (PTR_ERR(context->memory_context) != -EOPNOTSUPP) { if (PTR_ERR(context->memory_context) != -EOPNOTSUPP) {