Commit ab3d8479 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-2024-06-20' of...

Merge tag 'drm-misc-next-2024-06-20' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-next

drm-misc-next for 6.11:

UAPI Changes:
  - New monochrome TV mode variant

Cross-subsystem Changes:
  - dma heaps: Change slightly the allocation hook prototype

Core Changes:

Driver Changes:
 - ivpu: various improvements over firmware handling, clocks, power
   management, scheduling and logging.
 - mgag200: Add BMC output, enable polling
 - panfrost: Enable MT8188 support
 - tidss: drm_panic support
 - zynqmp_dp: IRQ cleanups, debugfs DP compliance testing API
 - bridge:
   - sii902x: state validation improvements
 - panel:
   - edp: Drop legacy panel compatibles
   - simple-bridge: Switch to devm_drm_bridge_add

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

From: Maxime Ripard <mripard@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240620-heretic-honored-macaque-b40f8a@houat
parents 91c93e47 b9578c49
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -31,13 +31,9 @@ properties:
        # AUO B116XAK01 eDP TFT LCD panel
      - auo,b116xa01
        # AU Optronics Corporation 13.3" FHD (1920x1080) color TFT-LCD panel
      - auo,b133han05
        # AU Optronics Corporation 13.3" FHD (1920x1080) color TFT-LCD panel
      - auo,b133htn01
        # AU Optronics Corporation 13.3" WXGA (1366x768) TFT LCD panel
      - auo,b133xtn01
        # AU Optronics Corporation 14.0" FHD (1920x1080) color TFT-LCD panel
      - auo,b140han06
        # BOE OPTOELECTRONICS TECHNOLOGY 10.1" WXGA TFT LCD panel
      - boe,nv101wxmn51
        # BOE NV133FHM-N61 13.3" FHD (1920x1080) TFT LCD Panel
@@ -56,8 +52,6 @@ properties:
      - innolux,n125hce-gn1
        # Innolux P120ZDG-BF1 12.02 inch eDP 2K display panel
      - innolux,p120zdg-bf1
        # InfoVision Optoelectronics M133NWF4 R0 13.3" FHD (1920x1080) TFT LCD panel
      - ivo,m133nwf4-r0
        # King & Display KD116N21-30NV-A010 eDP TFT LCD panel
      - kingdisplay,kd116n21-30nv-a010
        # LG LP079QX1-SP0V 7.9" (1536x2048 pixels) TFT LCD panel
@@ -78,10 +72,6 @@ properties:
      - sharp,ld-d5116z01b
        # Sharp 12.3" (2400x1600 pixels) TFT LCD panel
      - sharp,lq123p1jx31
        # Sharp 14" (1920x1080 pixels) TFT LCD panel
      - sharp,lq140m1jw46
        # Starry 12.2" (1920x1200 pixels) TFT LCD panel
      - starry,kr122ea0sra

  backlight: true
  ddc-i2c-bus: true
+4 −1
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ properties:
          - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable
      - items:
          - enum:
              - mediatek,mt8188-mali
              - mediatek,mt8192-mali
          - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable

@@ -195,7 +196,9 @@ allOf:
      properties:
        compatible:
          contains:
            const: mediatek,mt8183b-mali
            enum:
              - mediatek,mt8183b-mali
              - mediatek,mt8188-mali
    then:
      properties:
        power-domains:
+1 −0
Original line number Diff line number Diff line
@@ -7196,6 +7196,7 @@ L: dri-devel@lists.freedesktop.org
S:	Maintained
T:	git https://gitlab.freedesktop.org/drm/misc/kernel.git
F:	Documentation/gpu/vkms.rst
F:	drivers/gpu/drm/ci/xfails/vkms*
F:	drivers/gpu/drm/vkms/
DRM DRIVER FOR VIRTUALBOX VIRTUAL GPU
+37 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2020-2023 Intel Corporation
 * Copyright (C) 2020-2024 Intel Corporation
 */

#include <linux/debugfs.h>
@@ -381,6 +381,39 @@ static const struct file_operations ivpu_resume_engine_fops = {
	.write = ivpu_resume_engine_fn,
};

static int dct_active_get(void *data, u64 *active_percent)
{
	struct ivpu_device *vdev = data;

	*active_percent = vdev->pm->dct_active_percent;

	return 0;
}

static int dct_active_set(void *data, u64 active_percent)
{
	struct ivpu_device *vdev = data;
	int ret;

	if (active_percent > 100)
		return -EINVAL;

	ret = ivpu_rpm_get(vdev);
	if (ret)
		return ret;

	if (active_percent)
		ret = ivpu_pm_dct_enable(vdev, active_percent);
	else
		ret = ivpu_pm_dct_disable(vdev);

	ivpu_rpm_put(vdev);

	return ret;
}

DEFINE_DEBUGFS_ATTRIBUTE(ivpu_dct_fops, dct_active_get, dct_active_set, "%llu\n");

void ivpu_debugfs_init(struct ivpu_device *vdev)
{
	struct dentry *debugfs_root = vdev->drm.debugfs_root;
@@ -409,7 +442,9 @@ void ivpu_debugfs_init(struct ivpu_device *vdev)
	debugfs_create_file("resume_engine", 0200, debugfs_root, vdev,
			    &ivpu_resume_engine_fops);

	if (ivpu_hw_ip_gen(vdev) >= IVPU_HW_IP_40XX)
	if (ivpu_hw_ip_gen(vdev) >= IVPU_HW_IP_40XX) {
		debugfs_create_file("fw_profiling_freq_drive", 0200,
				    debugfs_root, vdev, &fw_profiling_freq_fops);
		debugfs_create_file("dct", 0644, debugfs_root, vdev, &ivpu_dct_fops);
	}
}
+36 −5
Original line number Diff line number Diff line
@@ -58,11 +58,11 @@ module_param_named(sched_mode, ivpu_sched_mode, int, 0444);
MODULE_PARM_DESC(sched_mode, "Scheduler mode: 0 - Default scheduler, 1 - Force HW scheduler");

bool ivpu_disable_mmu_cont_pages;
module_param_named(disable_mmu_cont_pages, ivpu_disable_mmu_cont_pages, bool, 0644);
module_param_named(disable_mmu_cont_pages, ivpu_disable_mmu_cont_pages, bool, 0444);
MODULE_PARM_DESC(disable_mmu_cont_pages, "Disable MMU contiguous pages optimization");

bool ivpu_force_snoop;
module_param_named(force_snoop, ivpu_force_snoop, bool, 0644);
module_param_named(force_snoop, ivpu_force_snoop, bool, 0444);
MODULE_PARM_DESC(force_snoop, "Force snooping for NPU host memory access");

struct ivpu_file_priv *ivpu_file_priv_get(struct ivpu_file_priv *file_priv)
@@ -391,8 +391,13 @@ int ivpu_boot(struct ivpu_device *vdev)
	ivpu_hw_irq_enable(vdev);
	ivpu_ipc_enable(vdev);

	if (ivpu_fw_is_cold_boot(vdev))
	if (ivpu_fw_is_cold_boot(vdev)) {
		ret = ivpu_pm_dct_init(vdev);
		if (ret)
			return ret;

		return ivpu_hw_sched_init(vdev);
	}

	return 0;
}
@@ -446,6 +451,26 @@ static const struct drm_driver driver = {
	.minor = DRM_IVPU_DRIVER_MINOR,
};

static void ivpu_context_abort_invalid(struct ivpu_device *vdev)
{
	struct ivpu_file_priv *file_priv;
	unsigned long ctx_id;

	mutex_lock(&vdev->context_list_lock);

	xa_for_each(&vdev->context_xa, ctx_id, file_priv) {
		if (!file_priv->has_mmu_faults || file_priv->aborted)
			continue;

		mutex_lock(&file_priv->lock);
		ivpu_context_abort_locked(file_priv);
		file_priv->aborted = true;
		mutex_unlock(&file_priv->lock);
	}

	mutex_unlock(&vdev->context_list_lock);
}

static irqreturn_t ivpu_irq_thread_handler(int irq, void *arg)
{
	struct ivpu_device *vdev = arg;
@@ -459,6 +484,12 @@ static irqreturn_t ivpu_irq_thread_handler(int irq, void *arg)
		case IVPU_HW_IRQ_SRC_IPC:
			ivpu_ipc_irq_thread_handler(vdev);
			break;
		case IVPU_HW_IRQ_SRC_MMU_EVTQ:
			ivpu_context_abort_invalid(vdev);
			break;
		case IVPU_HW_IRQ_SRC_DCT:
			ivpu_pm_dct_irq_thread_handler(vdev);
			break;
		default:
			ivpu_err_ratelimited(vdev, "Unknown IRQ source: %u\n", irq_src);
			break;
@@ -664,14 +695,14 @@ static void ivpu_bo_unbind_all_user_contexts(struct ivpu_device *vdev)

static void ivpu_dev_fini(struct ivpu_device *vdev)
{
	ivpu_jobs_abort_all(vdev);
	ivpu_pm_cancel_recovery(vdev);
	ivpu_pm_disable(vdev);
	ivpu_prepare_for_reset(vdev);
	ivpu_shutdown(vdev);

	ivpu_ms_cleanup_all(vdev);
	ivpu_jobs_abort_all(vdev);
	ivpu_job_done_consumer_fini(vdev);
	ivpu_pm_cancel_recovery(vdev);
	ivpu_bo_unbind_all_user_contexts(vdev);

	ivpu_ipc_fini(vdev);
Loading