CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun May 22 21:18:12 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_gmbus.c Log Message: i915: Fix sense of conditional for gmbus wait. This enables i915 to again retrieve EDID data from displays over the I2C DDC. Embarrassing. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.6 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.7 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.6 Sun May 22 20:35:20 2022 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Sun May 22 21:18:12 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_gmbus.c,v 1.6 2022/05/22 20:35:20 riastradh Exp $ */ +/* $NetBSD: intel_gmbus.c,v 1.7 2022/05/22 21:18:12 riastradh Exp $ */ /* * Copyright (c) 2006 Dave Airlie @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.6 2022/05/22 20:35:20 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.7 2022/05/22 21:18:12 riastradh Exp $"); #include #include @@ -354,8 +354,8 @@ static int gmbus_wait(struct drm_i915_pr unsigned timeout = 50*1000; ret = 0; - while ((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore, - GMBUS2)) & status) { + while (((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore, +GMBUS2)) & status) == 0) { if (--timeout == 0) { ret = -ETIMEDOUT; break; @@ -370,7 +370,7 @@ static int gmbus_wait(struct drm_i915_pr (((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore, GMBUS2)) & status) - == 0)); + != 0)); /* * After DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL, ret<0 on * error (-ERESTARTSYS, interrupt), ret=0 on timeout,
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun May 22 21:18:12 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_gmbus.c Log Message: i915: Fix sense of conditional for gmbus wait. This enables i915 to again retrieve EDID data from displays over the I2C DDC. Embarrassing. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun May 22 20:35:20 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_gmbus.c Log Message: i915: Raise gmbus_wait timeout from 10ms to 50ms to match upstream. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.5 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.6 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.5 Sun May 22 18:41:22 2022 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Sun May 22 20:35:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_gmbus.c,v 1.5 2022/05/22 18:41:22 riastradh Exp $ */ +/* $NetBSD: intel_gmbus.c,v 1.6 2022/05/22 20:35:20 riastradh Exp $ */ /* * Copyright (c) 2006 Dave Airlie @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.5 2022/05/22 18:41:22 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.6 2022/05/22 20:35:20 riastradh Exp $"); #include #include @@ -351,7 +351,7 @@ static int gmbus_wait(struct drm_i915_pr status |= GMBUS_SATOER; if (!irq_en) { - unsigned timeout = 10*1000; + unsigned timeout = 50*1000; ret = 0; while ((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore, @@ -366,7 +366,7 @@ static int gmbus_wait(struct drm_i915_pr DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, &dev_priv->gmbus_wait_queue, &dev_priv->gmbus_wait_lock, - msecs_to_jiffies_timeout(10), + msecs_to_jiffies_timeout(50), (((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore, GMBUS2)) & status)
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun May 22 20:35:20 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_gmbus.c Log Message: i915: Raise gmbus_wait timeout from 10ms to 50ms to match upstream. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun May 22 18:41:22 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_gmbus.c Log Message: i915: Fix bug in gmbus_wait: test status passed, not GMBUS_ACTIVE. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.4 Sun Dec 19 12:40:31 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Sun May 22 18:41:22 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_gmbus.c,v 1.4 2021/12/19 12:40:31 riastradh Exp $ */ +/* $NetBSD: intel_gmbus.c,v 1.5 2022/05/22 18:41:22 riastradh Exp $ */ /* * Copyright (c) 2006 Dave Airlie @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.4 2021/12/19 12:40:31 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.5 2022/05/22 18:41:22 riastradh Exp $"); #include #include @@ -355,7 +355,7 @@ static int gmbus_wait(struct drm_i915_pr ret = 0; while ((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore, - GMBUS2)) & GMBUS_ACTIVE) { + GMBUS2)) & status) { if (--timeout == 0) { ret = -ETIMEDOUT; break; @@ -369,7 +369,7 @@ static int gmbus_wait(struct drm_i915_pr msecs_to_jiffies_timeout(10), (((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore, GMBUS2)) - & GMBUS_ACTIVE) + & status) == 0)); /* * After DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL, ret<0 on
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun May 22 18:41:22 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_gmbus.c Log Message: i915: Fix bug in gmbus_wait: test status passed, not GMBUS_ACTIVE. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Feb 27 21:23:39 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_psr.h Log Message: i915: Disable PSR for now. Something seems to be wrong with it, causing the display to get stuck. To be diagnosed -- this is a performance optimization, but it's better to work than to fail to work even if failing to work costs a little less energy! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_psr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_psr.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_psr.h:1.2 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_psr.h:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_psr.h:1.2 Sat Dec 18 23:45:30 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_psr.h Sun Feb 27 21:23:39 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_psr.h,v 1.2 2021/12/18 23:45:30 riastradh Exp $ */ +/* $NetBSD: intel_psr.h,v 1.3 2022/02/27 21:23:39 riastradh Exp $ */ /* SPDX-License-Identifier: MIT */ /* @@ -16,7 +16,8 @@ struct drm_i915_private; struct intel_crtc_state; struct intel_dp; -#define CAN_PSR(dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support) +/* PSR is disabled on NetBSD for now until we find what's wrong with it */ +#define CAN_PSR(dev_priv) 0//(HAS_PSR(dev_priv) && dev_priv->psr.sink_support) void intel_psr_init_dpcd(struct intel_dp *intel_dp); void intel_psr_enable(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Feb 27 21:23:39 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_psr.h Log Message: i915: Disable PSR for now. Something seems to be wrong with it, causing the display to get stuck. To be diagnosed -- this is a performance optimization, but it's better to work than to fail to work even if failing to work costs a little less energy! To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_psr.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Feb 27 14:20:30 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_acpi.c Log Message: i915: Omit needless ifdefs around ACPI API. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c:1.5 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c:1.6 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c:1.5 Sun Feb 27 14:19:35 2022 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c Sun Feb 27 14:20:30 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_acpi.c,v 1.5 2022/02/27 14:19:35 riastradh Exp $ */ +/* $NetBSD: intel_acpi.c,v 1.6 2022/02/27 14:20:30 riastradh Exp $ */ // SPDX-License-Identifier: GPL-2.0 /* @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_acpi.c,v 1.5 2022/02/27 14:19:35 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_acpi.c,v 1.6 2022/02/27 14:20:30 riastradh Exp $"); #include #include @@ -181,11 +181,7 @@ static const char *intel_dsm_mux_type(u8 static void intel_dsm_platform_mux_info(acpi_handle dhandle) { int i; -#ifdef __NetBSD__ - ACPI_OBJECT *pkg, *connector_count; -#else union acpi_object *pkg, *connector_count; -#endif pkg = acpi_evaluate_dsm_typed(dhandle, &intel_dsm_guid, INTEL_DSM_REVISION_ID, INTEL_DSM_FN_PLATFORM_MUX_INFO, @@ -199,15 +195,9 @@ static void intel_dsm_platform_mux_info( DRM_DEBUG_DRIVER("MUX info connectors: %lld\n", (unsigned long long)connector_count->integer.value); for (i = 1; i < pkg->package.count; i++) { -#ifdef __NetBSD__ - ACPI_OBJECT *obj = &pkg->package.elements[i]; - ACPI_OBJECT *connector_id = &obj->package.elements[0]; - ACPI_OBJECT *info = &obj->package.elements[1]; -#else union acpi_object *obj = &pkg->package.elements[i]; union acpi_object *connector_id = &obj->package.elements[0]; union acpi_object *info = &obj->package.elements[1]; -#endif DRM_DEBUG_DRIVER("Connector id: 0x%016llx\n", (unsigned long long)connector_id->integer.value); DRM_DEBUG_DRIVER(" port id: %s\n",
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Feb 27 14:20:30 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_acpi.c Log Message: i915: Omit needless ifdefs around ACPI API. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Feb 27 14:19:35 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_acpi.c Log Message: i915: Use pci_get_segment, not 0. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c:1.4 Sun Dec 19 11:38:03 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c Sun Feb 27 14:19:35 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_acpi.c,v 1.4 2021/12/19 11:38:03 riastradh Exp $ */ +/* $NetBSD: intel_acpi.c,v 1.5 2022/02/27 14:19:35 riastradh Exp $ */ // SPDX-License-Identifier: GPL-2.0 /* @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_acpi.c,v 1.4 2021/12/19 11:38:03 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_acpi.c,v 1.5 2022/02/27 14:19:35 riastradh Exp $"); #include #include @@ -268,8 +268,9 @@ intel_dsm_vga_match(const struct pci_att return 0; vga_count++; - struct acpi_devnode *node = acpi_pcidev_find(0 /*XXX segment*/, - pa->pa_bus, pa->pa_device, pa->pa_function); + struct acpi_devnode *node = + acpi_pcidev_find(pci_get_segment(pa->pa_pc), + pa->pa_bus, pa->pa_device, pa->pa_function); if (node != NULL && intel_dsm_handle == NULL) intel_dsm_handle = intel_dsm_pci_probe(node->ad_handle); return 0;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Feb 27 14:19:35 UTC 2022 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_acpi.c Log Message: i915: Use pci_get_segment, not 0. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 26 21:00:51 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_panel.c Log Message: i915: Unifdef cnp_enable/disable_backlight. Not sure why this was ifdef'd out in the first place! Appears to have been a mistake in merge. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c:1.4 Sun Dec 19 11:48:11 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c Sun Dec 26 21:00:51 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_panel.c,v 1.4 2021/12/19 11:48:11 riastradh Exp $ */ +/* $NetBSD: intel_panel.c,v 1.5 2021/12/26 21:00:51 riastradh Exp $ */ /* * Copyright © 2006-2010 Intel Corporation @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.4 2021/12/19 11:48:11 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.5 2021/12/26 21:00:51 riastradh Exp $"); #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -831,7 +831,6 @@ static void bxt_disable_backlight(const } } -#ifndef __NetBSD__ /* XXX mipi */ static void cnp_disable_backlight(const struct drm_connector_state *old_conn_state) { struct intel_connector *connector = to_intel_connector(old_conn_state->connector); @@ -846,6 +845,7 @@ static void cnp_disable_backlight(const tmp & ~BXT_BLC_PWM_ENABLE); } +#ifndef __NetBSD__ /* XXX mipi */ static void pwm_disable_backlight(const struct drm_connector_state *old_conn_state) { struct intel_connector *connector = to_intel_connector(old_conn_state->connector); @@ -1138,7 +1138,6 @@ static void bxt_enable_backlight(const s pwm_ctl | BXT_BLC_PWM_ENABLE); } -#ifndef __NetBSD__ /* XXX mipi */ static void cnp_enable_backlight(const struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state) { @@ -1170,6 +1169,7 @@ static void cnp_enable_backlight(const s pwm_ctl | BXT_BLC_PWM_ENABLE); } +#ifndef __NetBSD__ /* XXX mipi */ static void pwm_enable_backlight(const struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state) { @@ -2008,10 +2008,8 @@ intel_panel_init_backlight_funcs(struct panel->backlight.hz_to_pwm = bxt_hz_to_pwm; } else if (INTEL_PCH_TYPE(dev_priv) >= PCH_CNP) { panel->backlight.setup = cnp_setup_backlight; -#ifndef __NetBSD__ /* XXX mipi */ panel->backlight.enable = cnp_enable_backlight; panel->backlight.disable = cnp_disable_backlight; -#endif panel->backlight.set = bxt_set_backlight; panel->backlight.get = bxt_get_backlight; panel->backlight.hz_to_pwm = cnp_hz_to_pwm;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 26 21:00:51 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_panel.c Log Message: i915: Unifdef cnp_enable/disable_backlight. Not sure why this was ifdef'd out in the first place! Appears to have been a mistake in merge. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Fri Dec 24 15:08:09 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_opregion.c intel_opregion.h Log Message: i915: Use AcpiOsMapMemory, not bus_space_map, for opregion. Needed because this appears in firmware-type memory mappings, which are excluded from bus_space_map. XXX pullup-9 (via manual patch since the code has changed a bit) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c:1.4 Sun Dec 19 11:49:11 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c Fri Dec 24 15:08:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_opregion.c,v 1.4 2021/12/19 11:49:11 riastradh Exp $ */ +/* $NetBSD: intel_opregion.c,v 1.5 2021/12/24 15:08:09 riastradh Exp $ */ /* * Copyright 2008 Intel Corporation @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_opregion.c,v 1.4 2021/12/19 11:49:11 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_opregion.c,v 1.5 2021/12/24 15:08:09 riastradh Exp $"); #include #include @@ -952,15 +952,7 @@ int intel_opregion_setup(struct drm_i915 INIT_WORK(&opregion->asle_work, asle_work); #ifdef __NetBSD__ - opregion->bst = pdev->pd_pa.pa_memt; - err = -bus_space_map(opregion->bst, asls, OPREGION_SIZE, - BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_CACHEABLE, - &opregion->asls_bsh); - if (err) { - DRM_DEBUG_DRIVER("Failed to map opregion: %d\n", err); - return err; - } - base = bus_space_vaddr(opregion->bst, opregion->asls_bsh); + base = AcpiOsMapMemory(asls, OPREGION_SIZE); #else base = memremap(asls, OPREGION_SIZE, MEMREMAP_WB); #endif @@ -1035,14 +1027,7 @@ int intel_opregion_setup(struct drm_i915 } #ifdef __NetBSD__ - if (bus_space_map(opregion->bst, rvda, - opregion->asle->rvds, - BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_CACHEABLE, - &opregion->rvda_bsh)) - opregion->rvda = NULL; - else - opregion->rvda = bus_space_vaddr(opregion->bst, - opregion->rvda_bsh); + opregion->rvda = AcpiOsMapMemory(rvda, opregion->asle->rvds); #else opregion->rvda = memremap(rvda, opregion->asle->rvds, MEMREMAP_WB); @@ -1058,11 +1043,8 @@ int intel_opregion_setup(struct drm_i915 } else { DRM_DEBUG_KMS("Invalid VBT in ACPI OpRegion (RVDA)\n"); #ifdef __NetBSD__ - if (opregion->rvda) { -bus_space_unmap(opregion->bst, -opregion->rvda_bsh, -opregion->asle->rvds); - } + AcpiOsUnmapMemory(opregion->rvda, + opregion->asle->rvds); #else memunmap(opregion->rvda); #endif @@ -1094,7 +1076,7 @@ out: err_out: #ifdef __NetBSD__ - bus_space_unmap(opregion->bst, opregion->asls_bsh, OPREGION_SIZE); + AcpiOsUnmapMemory(base, OPREGION_SIZE); #else memunmap(base); #endif @@ -1251,14 +1233,14 @@ void intel_opregion_unregister(struct dr /* just clear all opregion memory pointers now */ #ifdef __NetBSD__ - bus_space_unmap(opregion->bst, opregion->asls_bsh, OPREGION_SIZE); + size_t rvds = opregion->asle->rvds; + AcpiOsUnmapMemory(opregion->header, OPREGION_SIZE); #else memunmap(opregion->header); #endif if (opregion->rvda) { #ifdef __NetBSD__ - bus_space_unmap(opregion->bst, opregion->rvda_bsh, - opregion->asle->rvds); + AcpiOsUnmapMemory(opregion->rvda, rvds); #else memunmap(opregion->rvda); #endif Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h:1.3 Sun Dec 19 11:49:11 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h Fri Dec 24 15:08:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_opregion.h,v 1.3 2021/12/19 11:49:11 riastradh Exp $ */ +/* $NetBSD: intel_opregion.h,v 1.4 2021/12/24 15:08:09 riastradh Exp $ */ /* * Copyright © 2008-2017 Intel Corporation @@ -38,17 +38,7 @@ struct opregion_acpi; struct opregion_swsci; struct opregion_asle; -#ifdef __NetBSD__ /* XXX acpi iomem */ -# include -# define __iomem __acpi_iomem -#endif - struct intel_opregion { -#ifdef __NetBSD__ - bus_space_tag_t bst; - bus_space_handle_t asls_bsh; - bus_space_handle_t rvda_bsh; -#endif struct opregion_header *header; struct opregion_acpi *acpi; struct opregion_swsci *swsci; @@ -66,10 +56,6 @@ struct intel_opregion {
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Fri Dec 24 15:08:09 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_opregion.c intel_opregion.h Log Message: i915: Use AcpiOsMapMemory, not bus_space_map, for opregion. Needed because this appears in firmware-type memory mappings, which are excluded from bus_space_map. XXX pullup-9 (via manual patch since the code has changed a bit) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:40:31 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_dp.c intel_gmbus.c Log Message: i915: Fix some timeout return values in gmbus and dp logic. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c:1.5 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c:1.6 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c:1.5 Sun Dec 19 12:03:57 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c Sun Dec 19 12:40:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_dp.c,v 1.5 2021/12/19 12:03:57 riastradh Exp $ */ +/* $NetBSD: intel_dp.c,v 1.6 2021/12/19 12:40:31 riastradh Exp $ */ /* * Copyright © 2008 Intel Corporation @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_dp.c,v 1.5 2021/12/19 12:03:57 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_dp.c,v 1.6 2021/12/19 12:40:31 riastradh Exp $"); #include #include @@ -1197,12 +1197,12 @@ intel_dp_aux_wait_done(struct intel_dp * &i915->gmbus_wait_queue, &i915->gmbus_wait_lock, msecs_to_jiffies_timeout(timeout_ms), C); - if (ret < 0) /* Failure: pretend same as done. */ - done = true; - else if (ret == 0) /* Timed out: not done. */ - done = false; - else /* Succeeded (ret > 0): done. */ - done = true; + /* + * ret<0 on error (-ERESTARTSYS, interrupt); ret=0 on + * timeout; ret>0 on success. We care about success + * only. + */ + done = (ret > 0); spin_unlock(&i915->gmbus_wait_lock); } else { done = wait_for_atomic(C, timeout_ms) == 0; Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c:1.3 Sun Dec 19 11:45:01 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Sun Dec 19 12:40:31 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_gmbus.c,v 1.3 2021/12/19 11:45:01 riastradh Exp $ */ +/* $NetBSD: intel_gmbus.c,v 1.4 2021/12/19 12:40:31 riastradh Exp $ */ /* * Copyright (c) 2006 Dave Airlie @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.3 2021/12/19 11:45:01 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.4 2021/12/19 12:40:31 riastradh Exp $"); #include #include @@ -371,6 +371,21 @@ static int gmbus_wait(struct drm_i915_pr GMBUS2)) & GMBUS_ACTIVE) == 0)); + /* + * After DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL, ret<0 on + * error (-ERESTARTSYS, interrupt), ret=0 on timeout, + * ret>0 on success (time remaining). + * + * We want ret=-ETIMEDOUT on timeout and ret=0 on + * success. + */ + if (ret < 0) { + /* error */ + } else if (ret == 0) { + ret = -ETIMEDOUT; + } else { + ret = 0; + } } I915_WRITE_FW(GMBUS4, 0); @@ -420,6 +435,21 @@ gmbus_wait_idle(struct drm_i915_private ((intel_uncore_read_fw(&dev_priv->uncore, GMBUS2) & GMBUS_ACTIVE) == 0)); + /* + * After DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL, ret<0 on + * error (-ERESTARTSYS, interrupt), ret=0 on timeout, + * ret>0 on success (time remaining). + * + * We want ret=-ETIMEDOUT on timeout and ret=0 on + * success. + */ + if (ret < 0) { + /* error */ + } else if (ret == 0) { + ret = -ETIMEDOUT; + } else { + ret = 0; + } } I915_WRITE_FW(GMBUS4, 0);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:40:31 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_dp.c intel_gmbus.c Log Message: i915: Fix some timeout return values in gmbus and dp logic. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:37:17 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.c Log Message: i915: Suppress spurious -Wmaybe-uninitialized warnings. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.11 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.12 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.11 Sun Dec 19 12:32:15 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Sun Dec 19 12:37:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display.c,v 1.11 2021/12/19 12:32:15 riastradh Exp $ */ +/* $NetBSD: intel_display.c,v 1.12 2021/12/19 12:37:17 riastradh Exp $ */ /* * Copyright © 2006-2007 Intel Corporation @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.11 2021/12/19 12:32:15 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.12 2021/12/19 12:37:17 riastradh Exp $"); #include "intel_display.h" /* for pipe_drmhack */ @@ -943,7 +943,7 @@ vlv_find_best_dpll(const struct intel_li clock.p = clock.p1 * clock.p2; /* based on hardware requirement, prefer bigger m1,m2 values */ for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) { - unsigned int ppm; + unsigned int ppm = 0; /*XXXGCC*/ clock.m2 = DIV_ROUND_CLOSEST(target * clock.p * clock.n, refclk * clock.m1); @@ -1005,7 +1005,7 @@ chv_find_best_dpll(const struct intel_li for (clock.p2 = limit->p2.p2_fast; clock.p2 >= limit->p2.p2_slow; clock.p2 -= clock.p2 > 10 ? 2 : 1) { - unsigned int error_ppm; + unsigned int error_ppm = 0; /*XXXGCC*/ clock.p = clock.p1 * clock.p2;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:37:17 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.c Log Message: i915: Suppress spurious -Wmaybe-uninitialized warnings. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:28:55 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.c Log Message: i915: Backport fix for locking-against-self on attach. commit d1b2828af0cc414356c18d7814b83ba33b472054 Author: Ville Syrjälä Date: Wed Jan 22 22:43:29 2020 +0200 drm/i915: Fix modeset locks in sanitize_watermarks() We've added more internal things that use modeset locks and thus we need to be prepared for intel_atomic_check() grabbing more locks than what our initial drm_modeset_lock_all_ctx() took. So we're missing the backoff handling here. Also drm_atomic_helper_duplicate_state() works against us by clearing state->acquire_ctx in anticipation of drm_atomic_helper_commit_duplicated_state() being used to commit the state. We could probably just reset acquire_ctx back, but instead let's just rewrite the whole thing without using either of those "helpers". There's also no need to add any connectors to the state here since we just want the new watermarks which don't depend on connectors. Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200122204329.2477-1-ville.syrj...@linux.intel.com Reviewed-by: Chris Wilson To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.9 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.10 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.9 Sun Dec 19 12:11:46 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Sun Dec 19 12:28:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display.c,v 1.9 2021/12/19 12:11:46 riastradh Exp $ */ +/* $NetBSD: intel_display.c,v 1.10 2021/12/19 12:28:55 riastradh Exp $ */ /* * Copyright © 2006-2007 Intel Corporation @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.9 2021/12/19 12:11:46 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.10 2021/12/19 12:28:55 riastradh Exp $"); #include "intel_display.h" /* for pipe_drmhack */ @@ -17329,6 +17329,30 @@ void intel_modeset_init_hw(struct drm_i9 i915->cdclk.logical = i915->cdclk.actual = i915->cdclk.hw; } +static int sanitize_watermarks_add_affected(struct drm_atomic_state *state) +{ + struct drm_plane *plane; + struct drm_crtc *crtc; + + drm_for_each_crtc(crtc, state->dev) { + struct drm_crtc_state *crtc_state; + + crtc_state = drm_atomic_get_crtc_state(state, crtc); + if (IS_ERR(crtc_state)) + return PTR_ERR(crtc_state); + } + + drm_for_each_plane(plane, state->dev) { + struct drm_plane_state *plane_state; + + plane_state = drm_atomic_get_plane_state(state, plane); + if (IS_ERR(plane_state)) + return PTR_ERR(plane_state); + } + + return 0; +} + /* * Calculate what we think the watermarks should be for the state we've read * out of the hardware and then immediately program those watermarks so that @@ -17339,9 +17363,8 @@ void intel_modeset_init_hw(struct drm_i9 * through the atomic check code to calculate new watermark values in the * state object. */ -static void sanitize_watermarks(struct drm_device *dev) +static void sanitize_watermarks(struct drm_i915_private *dev_priv) { - struct drm_i915_private *dev_priv = to_i915(dev); struct drm_atomic_state *state; struct intel_atomic_state *intel_state; struct intel_crtc *crtc; @@ -17354,26 +17377,17 @@ static void sanitize_watermarks(struct d if (!dev_priv->display.optimize_watermarks) return; - /* - * We need to hold connection_mutex before calling duplicate_state so - * that the connector loop is protected. - */ - drm_modeset_acquire_init(&ctx, 0); -retry: - ret = drm_modeset_lock_all_ctx(dev, &ctx); - if (ret == -EDEADLK) { - drm_modeset_backoff(&ctx); - goto retry; - } else if (WARN_ON(ret)) { - goto fail; - } - - state = drm_atomic_helper_duplicate_state(dev, &ctx); - if (WARN_ON(IS_ERR(state))) - goto fail; + state = drm_atomic_state_alloc(&dev_priv->drm); + if (WARN_ON(!state)) + return; intel_state = to_intel_atomic_state(state); + drm_modeset_acquire_init(&ctx, 0); + +retry: + state->acquire_ctx = &ctx; + /* * Hardware readout is the only time we don't want to calculate * intermediate watermarks (since we don't trust the current @@ -17382,22 +17396,13 @@ retry: if (!HAS_GMCH(dev_priv)) intel_state->skip_intermediate_wm = true; - ret = intel_atomic_check(dev, state); - if (ret) { - /* - * If we fail here, it means that the hardware appears to be - * programmed in a way that shouldn't be possibl
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:28:55 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.c Log Message: i915: Backport fix for locking-against-self on attach. commit d1b2828af0cc414356c18d7814b83ba33b472054 Author: Ville Syrjälä Date: Wed Jan 22 22:43:29 2020 +0200 drm/i915: Fix modeset locks in sanitize_watermarks() We've added more internal things that use modeset locks and thus we need to be prepared for intel_atomic_check() grabbing more locks than what our initial drm_modeset_lock_all_ctx() took. So we're missing the backoff handling here. Also drm_atomic_helper_duplicate_state() works against us by clearing state->acquire_ctx in anticipation of drm_atomic_helper_commit_duplicated_state() being used to commit the state. We could probably just reset acquire_ctx back, but instead let's just rewrite the whole thing without using either of those "helpers". There's also no need to add any connectors to the state here since we just want the new watermarks which don't depend on connectors. Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200122204329.2477-1-ville.syrj...@linux.intel.com Reviewed-by: Chris Wilson To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:24:49 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_bios.c Log Message: i915: No need for #ifdef __NetBSD__ to sprinkle legitimate const. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_bios.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_bios.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_bios.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_bios.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_bios.c:1.3 Sun Dec 19 11:38:03 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_bios.c Sun Dec 19 12:24:49 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_bios.c,v 1.3 2021/12/19 11:38:03 riastradh Exp $ */ +/* $NetBSD: intel_bios.c,v 1.4 2021/12/19 12:24:49 riastradh Exp $ */ /* * Copyright © 2006 Intel Corporation @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_bios.c,v 1.3 2021/12/19 11:38:03 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_bios.c,v 1.4 2021/12/19 12:24:49 riastradh Exp $"); #include #include @@ -188,16 +188,10 @@ get_lvds_dvo_timing(const struct bdb_lvd int dvo_timing_offset = lvds_lfp_data_ptrs->ptr[0].dvo_timing_offset - lvds_lfp_data_ptrs->ptr[0].fp_timing_offset; -#ifdef __NetBSD__ const char *entry = (const char *)lvds_lfp_data->data + lfp_data_size * index; return (const struct lvds_dvo_timing *)(entry + dvo_timing_offset); -#else - char *entry = (char *)lvds_lfp_data->data + lfp_data_size * index; - - return (struct lvds_dvo_timing *)(entry + dvo_timing_offset); -#endif } /* get lvds_fp_timing entry
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:24:49 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_bios.c Log Message: i915: No need for #ifdef __NetBSD__ to sprinkle legitimate const. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_bios.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:09:43 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_frontbuffer.c Log Message: i915: Call i915_active_fini after init for frontbuffer. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_frontbuffer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_frontbuffer.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_frontbuffer.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_frontbuffer.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_frontbuffer.c:1.2 Sat Dec 18 23:45:30 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_frontbuffer.c Sun Dec 19 12:09:43 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_frontbuffer.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $ */ +/* $NetBSD: intel_frontbuffer.c,v 1.3 2021/12/19 12:09:43 riastradh Exp $ */ /* * Copyright © 2014 Intel Corporation @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_frontbuffer.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_frontbuffer.c,v 1.3 2021/12/19 12:09:43 riastradh Exp $"); #include "display/intel_dp.h" @@ -238,6 +238,7 @@ static void frontbuffer_release(struct k spin_unlock(&to_i915(obj->base.dev)->fb_tracking.lock); i915_gem_object_put(obj); + i915_active_fini(&front->write); kfree_rcu(front, rcu); }
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:09:43 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_frontbuffer.c Log Message: i915: Call i915_active_fini after init for frontbuffer. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_frontbuffer.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:04:42 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_sprite.c Log Message: i915: Rework locking in intel_pipe_update_start/end. Use event_lock rather than vbl_lock for the operation; narrow the scope of vbl_lock. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c:1.4 Sun Dec 19 12:04:33 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c Sun Dec 19 12:04:42 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_sprite.c,v 1.4 2021/12/19 12:04:33 riastradh Exp $ */ +/* $NetBSD: intel_sprite.c,v 1.5 2021/12/19 12:04:42 riastradh Exp $ */ /* * Copyright © 2011 Intel Corporation @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.4 2021/12/19 12:04:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.5 2021/12/19 12:04:42 riastradh Exp $"); #include #include @@ -122,12 +122,12 @@ void intel_pipe_update_start(const struc psr_status); spin_lock(&crtc->base.dev->event_lock); - spin_lock(&dev_priv->drm.vbl_lock); crtc->debug.min_vbl = min; crtc->debug.max_vbl = max; trace_intel_pipe_update_start(crtc); + spin_lock(&dev_priv->drm.vbl_lock); DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL(ret, wq, &dev_priv->drm.vbl_lock, timeout, (scanline = intel_get_crtc_scanline(crtc), @@ -154,6 +154,7 @@ void intel_pipe_update_start(const struc */ while (need_vlv_dsi_wa && scanline == vblank_start) scanline = intel_get_crtc_scanline(crtc); + spin_unlock(&dev_priv->drm.vbl_lock); crtc->debug.scanline_start = scanline; crtc->debug.start_vbl_time = ktime_get(); @@ -164,7 +165,6 @@ void intel_pipe_update_start(const struc irq_disable: spin_lock(&crtc->base.dev->event_lock); - spin_lock(&dev_priv->drm.vbl_lock); } /** @@ -191,9 +191,7 @@ void intel_pipe_update_end(struct intel_ * event outside of the critical section - the spinlock might spin for a * while ... */ if (new_crtc_state->uapi.event) { -#ifndef __NetBSD__ /* XXX locking against self */ WARN_ON(drm_crtc_vblank_get(&crtc->base) != 0); -#endif drm_crtc_arm_vblank_event(&crtc->base, new_crtc_state->uapi.event); @@ -201,7 +199,6 @@ void intel_pipe_update_end(struct intel_ new_crtc_state->uapi.event = NULL; } - spin_unlock(&dev_priv->drm.vbl_lock); spin_unlock(&crtc->base.dev->event_lock); if (intel_vgpu_active(dev_priv))
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:04:42 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_sprite.c Log Message: i915: Rework locking in intel_pipe_update_start/end. Use event_lock rather than vbl_lock for the operation; narrow the scope of vbl_lock. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:04:34 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_sprite.c Log Message: i915: Work around lock order reversal. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c:1.3 Sun Dec 19 11:49:11 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c Sun Dec 19 12:04:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_sprite.c,v 1.3 2021/12/19 11:49:11 riastradh Exp $ */ +/* $NetBSD: intel_sprite.c,v 1.4 2021/12/19 12:04:33 riastradh Exp $ */ /* * Copyright © 2011 Intel Corporation @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.3 2021/12/19 11:49:11 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_sprite.c,v 1.4 2021/12/19 12:04:33 riastradh Exp $"); #include #include @@ -121,6 +121,7 @@ void intel_pipe_update_start(const struc DRM_ERROR("PSR idle timed out 0x%x, atomic update may fail\n", psr_status); + spin_lock(&crtc->base.dev->event_lock); spin_lock(&dev_priv->drm.vbl_lock); crtc->debug.min_vbl = min; @@ -162,6 +163,7 @@ void intel_pipe_update_start(const struc return; irq_disable: + spin_lock(&crtc->base.dev->event_lock); spin_lock(&dev_priv->drm.vbl_lock); } @@ -189,17 +191,18 @@ void intel_pipe_update_end(struct intel_ * event outside of the critical section - the spinlock might spin for a * while ... */ if (new_crtc_state->uapi.event) { +#ifndef __NetBSD__ /* XXX locking against self */ WARN_ON(drm_crtc_vblank_get(&crtc->base) != 0); +#endif - spin_lock(&crtc->base.dev->event_lock); drm_crtc_arm_vblank_event(&crtc->base, new_crtc_state->uapi.event); - spin_unlock(&crtc->base.dev->event_lock); new_crtc_state->uapi.event = NULL; } spin_unlock(&dev_priv->drm.vbl_lock); + spin_unlock(&crtc->base.dev->event_lock); if (intel_vgpu_active(dev_priv)) return;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:04:34 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_sprite.c Log Message: i915: Work around lock order reversal. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_sprite.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:03:57 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_dp.c Log Message: i915: connector->kdev doesn't get initialized at the moment. It's a sysfs thing and we have all that unwired. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c:1.4 Sun Dec 19 11:38:26 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c Sun Dec 19 12:03:57 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_dp.c,v 1.4 2021/12/19 11:38:26 riastradh Exp $ */ +/* $NetBSD: intel_dp.c,v 1.5 2021/12/19 12:03:57 riastradh Exp $ */ /* * Copyright © 2008 Intel Corporation @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_dp.c,v 1.4 2021/12/19 11:38:26 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_dp.c,v 1.5 2021/12/19 12:03:57 riastradh Exp $"); #include #include @@ -5845,7 +5845,7 @@ intel_dp_connector_register(struct drm_c #ifdef __NetBSD__ DRM_DEBUG_KMS("registering %s bus for %s\n", - intel_dp->aux.name, device_xname(connector->kdev)); + intel_dp->aux.name, connector->name); #else DRM_DEBUG_KMS("registering %s bus for %s\n", intel_dp->aux.name, connector->kdev->kobj.name);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:03:57 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_dp.c Log Message: i915: connector->kdev doesn't get initialized at the moment. It's a sysfs thing and we have all that unwired. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_dp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:56:23 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.c Log Message: i915: Remember to initialize the atomic commit lock and waitqueue! To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.6 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.7 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.6 Sun Dec 19 11:56:08 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Sun Dec 19 11:56:23 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display.c,v 1.6 2021/12/19 11:56:08 riastradh Exp $ */ +/* $NetBSD: intel_display.c,v 1.7 2021/12/19 11:56:23 riastradh Exp $ */ /* * Copyright © 2006-2007 Intel Corporation @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.6 2021/12/19 11:56:08 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.7 2021/12/19 11:56:23 riastradh Exp $"); #include "intel_display.h" /* for pipe_drmhack */ @@ -17562,6 +17562,9 @@ int intel_modeset_init(struct drm_i915_p i915->flip_wq = alloc_workqueue("i915_flip", WQ_HIGHPRI | WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE); + spin_lock_init(&i915->atomic_commit_lock); + DRM_INIT_WAITQUEUE(&i915->atomic_commit_wq, "i915cmit"); + intel_mode_config_init(i915); ret = intel_bw_init(i915); @@ -18551,6 +18554,9 @@ void intel_modeset_driver_remove(struct intel_bw_cleanup(i915); + DRM_DESTROY_WAITQUEUE(&i915->atomic_commit_wq); + spin_lock_destroy(&i915->atomic_commit_lock); + destroy_workqueue(i915->flip_wq); destroy_workqueue(i915->modeset_wq);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:56:23 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.c Log Message: i915: Remember to initialize the atomic commit lock and waitqueue! To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:56:08 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_atomic.c intel_atomic.h intel_display.c Log Message: i915: Keep i915_sw_fence_init/fini paired. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.h cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.c:1.3 Sun Dec 19 11:38:03 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.c Sun Dec 19 11:56:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_atomic.c,v 1.3 2021/12/19 11:38:03 riastradh Exp $ */ +/* $NetBSD: intel_atomic.c,v 1.4 2021/12/19 11:56:08 riastradh Exp $ */ /* * Copyright © 2015 Intel Corporation @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_atomic.c,v 1.3 2021/12/19 11:38:03 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_atomic.c,v 1.4 2021/12/19 11:56:08 riastradh Exp $"); #include #include @@ -496,6 +496,8 @@ intel_atomic_state_alloc(struct drm_devi return NULL; } + i915_sw_fence_init(&state->commit_ready, intel_atomic_commit_ready); + return &state->base; } Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.h:1.2 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.h:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.h:1.2 Sat Dec 18 23:45:29 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.h Sun Dec 19 11:56:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_atomic.h,v 1.2 2021/12/18 23:45:29 riastradh Exp $ */ +/* $NetBSD: intel_atomic.h,v 1.3 2021/12/19 11:56:08 riastradh Exp $ */ /* SPDX-License-Identifier: MIT */ /* @@ -61,4 +61,9 @@ int intel_atomic_lock_global_state(struc int intel_atomic_serialize_global_state(struct intel_atomic_state *state); +#include "i915_sw_fence.h" +int __i915_sw_fence_call +intel_atomic_commit_ready(struct i915_sw_fence *fence, + enum i915_sw_fence_notify notify); + #endif /* __INTEL_ATOMIC_H__ */ Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.5 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.6 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.5 Sun Dec 19 11:55:24 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Sun Dec 19 11:56:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display.c,v 1.5 2021/12/19 11:55:24 riastradh Exp $ */ +/* $NetBSD: intel_display.c,v 1.6 2021/12/19 11:56:08 riastradh Exp $ */ /* * Copyright © 2006-2007 Intel Corporation @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.5 2021/12/19 11:55:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.6 2021/12/19 11:56:08 riastradh Exp $"); #include "intel_display.h" /* for pipe_drmhack */ @@ -15503,7 +15503,7 @@ static void intel_atomic_commit_work(str intel_atomic_commit_tail(state); } -static int __i915_sw_fence_call +int __i915_sw_fence_call intel_atomic_commit_ready(struct i915_sw_fence *fence, enum i915_sw_fence_notify notify) { @@ -15560,8 +15560,7 @@ static int intel_atomic_commit(struct dr state->wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm); drm_atomic_state_get(&state->base); - i915_sw_fence_init(&state->commit_ready, - intel_atomic_commit_ready); + i915_sw_fence_reinit(&state->commit_ready); /* * The intel_legacy_cursor_update() fast path takes care
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:56:08 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_atomic.c intel_atomic.h intel_display.c Log Message: i915: Keep i915_sw_fence_init/fini paired. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.c cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_atomic.h cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:55:07 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.c Log Message: i915: Quietly disable vblank-related rps boost for now. Need a way to call a function on vblank, which cv(9) (generally reasonably) doesn't give us. `Just' a performance thing, so... To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c:1.3 Sun Dec 19 11:38:03 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Sun Dec 19 11:55:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display.c,v 1.3 2021/12/19 11:38:03 riastradh Exp $ */ +/* $NetBSD: intel_display.c,v 1.4 2021/12/19 11:55:07 riastradh Exp $ */ /* * Copyright © 2006-2007 Intel Corporation @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.3 2021/12/19 11:38:03 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_display.c,v 1.4 2021/12/19 11:55:07 riastradh Exp $"); #include "intel_display.h" /* for pipe_drmhack */ @@ -15674,6 +15674,7 @@ static int do_rps_boost(struct wait_queu static void add_rps_boost_after_vblank(struct drm_crtc *crtc, struct dma_fence *fence) { +#ifndef __NetBSD__ /* XXX i915 rps boost */ struct wait_rps_boost *wait; if (!dma_fence_is_i915(fence)) @@ -15685,9 +15686,6 @@ static void add_rps_boost_after_vblank(s if (drm_crtc_vblank_get(crtc)) return; -#ifdef __NetBSD__ - panic("NYI %p", &wait); -#else wait = kmalloc(sizeof(*wait), GFP_KERNEL); if (!wait) { drm_crtc_vblank_put(crtc);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:55:07 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.c Log Message: i915: Quietly disable vblank-related rps boost for now. Need a way to call a function on vblank, which cv(9) (generally reasonably) doesn't give us. `Just' a performance thing, so... To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:54:48 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display_power.c Log Message: Do not try to map VGA registers before intelfb is ready double mapping fails Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display_power.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display_power.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display_power.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display_power.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display_power.c:1.3 Sun Dec 19 11:38:03 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display_power.c Sun Dec 19 11:54:48 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display_power.c,v 1.3 2021/12/19 11:38:03 riastradh Exp $ */ +/* $NetBSD: intel_display_power.c,v 1.4 2021/12/19 11:54:48 riastradh Exp $ */ /* SPDX-License-Identifier: MIT */ /* @@ -6,7 +6,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_display_power.c,v 1.3 2021/12/19 11:38:03 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_display_power.c,v 1.4 2021/12/19 11:54:48 riastradh Exp $"); #include "display/intel_crt.h" #include "display/intel_dp.h" @@ -273,8 +273,10 @@ bool intel_display_power_is_enabled(stru static void hsw_power_well_post_enable(struct drm_i915_private *dev_priv, u8 irq_pipe_mask, bool has_vga) { +#ifndef __NetBSD__ /* XXX We wait until intelfb is ready. */ if (has_vga) intel_vga_reset_io_mem(dev_priv); +#endif if (irq_pipe_mask) gen8_irq_power_well_post_enable(dev_priv, irq_pipe_mask);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:54:48 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display_power.c Log Message: Do not try to map VGA registers before intelfb is ready double mapping fails Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display_power.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:48:27 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.h Log Message: expand to_intel_plane_state so we can use const_container_of Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.5 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.6 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.5 Sun Dec 19 11:38:03 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Sun Dec 19 11:48:27 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display.h,v 1.5 2021/12/19 11:38:03 riastradh Exp $ */ +/* $NetBSD: intel_display.h,v 1.6 2021/12/19 11:48:27 riastradh Exp $ */ /* * Copyright © 2006-2019 Intel Corporation @@ -481,7 +481,7 @@ enum phy_fia { for_each_intel_plane_mask(((crtc_state)->uapi.state->dev), (plane), \ ((crtc_state)->uapi.plane_mask)) \ for_each_if ((plane_state = \ - to_intel_plane_state(__drm_atomic_get_current_plane_state((crtc_state)->uapi.state, &plane->base + const_container_of(__drm_atomic_get_current_plane_state((crtc_state)->uapi.state, &plane->base), struct intel_plane_state, uapi))) #define for_each_new_intel_connector_in_state(__state, connector, new_connector_state, __i) \ for ((__i) = 0; \
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:48:27 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.h Log Message: expand to_intel_plane_state so we can use const_container_of Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:48:11 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_panel.c Log Message: No muppets provided yet Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c:1.3 Sun Dec 19 01:53:39 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c Sun Dec 19 11:48:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_panel.c,v 1.3 2021/12/19 01:53:39 riastradh Exp $ */ +/* $NetBSD: intel_panel.c,v 1.4 2021/12/19 11:48:11 riastradh Exp $ */ /* * Copyright © 2006-2010 Intel Corporation @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.3 2021/12/19 01:53:39 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_panel.c,v 1.4 2021/12/19 11:48:11 riastradh Exp $"); #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -2008,8 +2008,10 @@ intel_panel_init_backlight_funcs(struct panel->backlight.hz_to_pwm = bxt_hz_to_pwm; } else if (INTEL_PCH_TYPE(dev_priv) >= PCH_CNP) { panel->backlight.setup = cnp_setup_backlight; +#ifndef __NetBSD__ /* XXX mipi */ panel->backlight.enable = cnp_enable_backlight; panel->backlight.disable = cnp_disable_backlight; +#endif panel->backlight.set = bxt_set_backlight; panel->backlight.get = bxt_get_backlight; panel->backlight.hz_to_pwm = cnp_hz_to_pwm;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:48:11 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_panel.c Log Message: No muppets provided yet Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_panel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:48:02 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_overlay.c Log Message: Undo local diff, nbsd-namespace.h Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_overlay.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_overlay.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_overlay.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_overlay.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_overlay.c:1.2 Sat Dec 18 23:45:30 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_overlay.c Sun Dec 19 11:48:02 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_overlay.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $ */ +/* $NetBSD: intel_overlay.c,v 1.3 2021/12/19 11:48:02 riastradh Exp $ */ /* * Copyright © 2009 @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_overlay.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_overlay.c,v 1.3 2021/12/19 11:48:02 riastradh Exp $"); #include #include @@ -43,6 +43,8 @@ __KERNEL_RCSID(0, "$NetBSD: intel_overla #include "intel_frontbuffer.h" #include "intel_overlay.h" +#include + /* Limits for overlay size. According to intel doc, the real limits are: * Y width: 4095, UV width (planar): 2047, Y height: 2047, * UV width (planar): * 1023. But the xorg thinks 2048 for height and width. Use @@ -1079,7 +1081,6 @@ int intel_overlay_put_image_ioctl(struct struct intel_overlay *overlay; struct drm_crtc *drmmode_crtc; struct intel_crtc *crtc; - struct drm_gem_object *new_gbo; struct drm_i915_gem_object *new_bo; int ret;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:48:02 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_overlay.c Log Message: Undo local diff, nbsd-namespace.h Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_overlay.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:47:33 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_lspcon.c Log Message: Make const compiler warnings happier Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_lspcon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_lspcon.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_lspcon.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_lspcon.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_lspcon.c:1.2 Sat Dec 18 23:45:30 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_lspcon.c Sun Dec 19 11:47:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_lspcon.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $ */ +/* $NetBSD: intel_lspcon.c,v 1.3 2021/12/19 11:47:33 riastradh Exp $ */ /* * Copyright © 2016 Intel Corporation @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_lspcon.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_lspcon.c,v 1.3 2021/12/19 11:47:33 riastradh Exp $"); #include #include @@ -388,7 +388,7 @@ static bool _lspcon_write_avi_infoframe_ while (val < len) { /* DPCD write for AVI IF can fail on a slow FW day, so retry */ for (retry = 0; retry < 5; retry++) { - ret = drm_dp_dpcd_write(aux, reg, (void *)data, 1); + ret = drm_dp_dpcd_write(aux, reg, (void *)__UNCONST(data), 1); if (ret == 1) { break; } else if (retry < 4) {
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:47:33 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_lspcon.c Log Message: Make const compiler warnings happier Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_lspcon.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:47:25 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_opregion.c Log Message: Undo local diffs, re-do local diffs Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c:1.2 Sat Dec 18 23:45:30 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c Sun Dec 19 11:47:25 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_opregion.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $ */ +/* $NetBSD: intel_opregion.c,v 1.3 2021/12/19 11:47:25 riastradh Exp $ */ /* * Copyright 2008 Intel Corporation @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_opregion.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_opregion.c,v 1.3 2021/12/19 11:47:25 riastradh Exp $"); #include #include @@ -275,13 +275,13 @@ struct opregion_asle_ext { static int swsci(struct drm_i915_private *dev_priv, u32 function, u32 parm, u32 *parm_out) { - struct drm_i915_private *dev_priv = dev->dev_private; struct opregion_swsci *swsci = dev_priv->opregion.swsci; + struct pci_dev *pdev = dev_priv->drm.pdev; u32 main_function, sub_function, scic; u16 swsci_val; u32 dslp; - if (!region_swsci) + if (!swsci) return -ENODEV; main_function = (function & SWSCI_SCIC_MAIN_FUNCTION_MASK) >> @@ -301,7 +301,7 @@ static int swsci(struct drm_i915_private } /* Driver sleep timeout in ms. */ - dslp = region_swsci->dslp; + dslp = swsci->dslp; if (!dslp) { /* The spec says 2ms should be the default, but it's too small * for some machines. */ @@ -314,7 +314,7 @@ static int swsci(struct drm_i915_private } /* The spec tells us to do this, but we are the only user... */ - scic = region_swsci->scic; + scic = swsci->scic; if (scic & SWSCI_SCIC_INDICATOR) { DRM_DEBUG_DRIVER("SWSCI request already in progress\n"); return -EBUSY; @@ -322,8 +322,8 @@ static int swsci(struct drm_i915_private scic = function | SWSCI_SCIC_INDICATOR; - region_swsci->parm = parm; - region_swsci->scic = scic; + swsci->parm = parm; + swsci->scic = scic; /* Ensure SCI event is selected and event trigger is cleared. */ pci_read_config_word(pdev, SWSCI, &swsci_val); @@ -338,7 +338,7 @@ static int swsci(struct drm_i915_private pci_write_config_word(pdev, SWSCI, swsci_val); /* Poll for the result. */ -#define C (((scic = region_swsci->scic) & SWSCI_SCIC_INDICATOR) == 0) +#define C (((scic = swsci->scic) & SWSCI_SCIC_INDICATOR) == 0) if (wait_for(C, dslp)) { DRM_DEBUG_DRIVER("SWSCI request timed out\n"); return -ETIMEDOUT; @@ -354,7 +354,7 @@ static int swsci(struct drm_i915_private } if (parm_out) - *parm_out = region_swsci->parm; + *parm_out = swsci->parm; return 0; @@ -622,6 +622,8 @@ void intel_opregion_asle_intr(struct drm #define ACPI_EV_LID(1<<1) #define ACPI_EV_DOCK (1<<2) +static struct intel_opregion *system_opregion; + #ifdef __NetBSD__ static void intel_opregion_video_event(ACPI_HANDLE hdl, uint32_t notify, void *opaque)
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:47:25 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_opregion.c Log Message: Undo local diffs, re-do local diffs Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:46:20 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_hdmi.c Log Message: ifdef out sysfs, unused static function Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c:1.4 Sun Dec 19 11:45:50 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c Sun Dec 19 11:46:19 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_hdmi.c,v 1.4 2021/12/19 11:45:50 riastradh Exp $ */ +/* $NetBSD: intel_hdmi.c,v 1.5 2021/12/19 11:46:19 riastradh Exp $ */ /* * Copyright 2006 Dave Airlie @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_hdmi.c,v 1.4 2021/12/19 11:45:50 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_hdmi.c,v 1.5 2021/12/19 11:46:19 riastradh Exp $"); #include #include @@ -2775,6 +2775,7 @@ static void chv_hdmi_pre_enable(struct i chv_phy_release_cl2_override(encoder); } +#ifndef __NetBSD__ static struct i2c_adapter * intel_hdmi_get_i2c_adapter(struct drm_connector *connector) { @@ -2783,9 +2784,11 @@ intel_hdmi_get_i2c_adapter(struct drm_co return intel_gmbus_get_adapter(dev_priv, intel_hdmi->ddc_bus); } +#endif static void intel_hdmi_create_i2c_symlink(struct drm_connector *connector) { +#ifndef __NetBSD__ /* XXX i915 hdmi sysfs */ struct i2c_adapter *adapter = intel_hdmi_get_i2c_adapter(connector); struct kobject *i2c_kobj = &adapter->dev.kobj; struct kobject *connector_kobj = &connector->kdev->kobj; @@ -2794,15 +2797,18 @@ static void intel_hdmi_create_i2c_symlin ret = sysfs_create_link(connector_kobj, i2c_kobj, i2c_kobj->name); if (ret) DRM_ERROR("Failed to create i2c symlink (%d)\n", ret); +#endif } static void intel_hdmi_remove_i2c_symlink(struct drm_connector *connector) { +#ifndef __NetBSD__ /* XXX i915 hdmi sysfs */ struct i2c_adapter *adapter = intel_hdmi_get_i2c_adapter(connector); struct kobject *i2c_kobj = &adapter->dev.kobj; struct kobject *connector_kobj = &connector->kdev->kobj; sysfs_remove_link(connector_kobj, i2c_kobj->name); +#endif } static int
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:46:20 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_hdmi.c Log Message: ifdef out sysfs, unused static function Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:45:50 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_hdcp.c intel_hdmi.c Log Message: i915: tweak hdmi To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c:1.3 Sun Dec 19 11:38:26 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c Sun Dec 19 11:45:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_hdcp.c,v 1.3 2021/12/19 11:38:26 riastradh Exp $ */ +/* $NetBSD: intel_hdcp.c,v 1.4 2021/12/19 11:45:50 riastradh Exp $ */ /* SPDX-License-Identifier: MIT */ /* @@ -11,7 +11,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_hdcp.c,v 1.3 2021/12/19 11:38:26 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_hdcp.c,v 1.4 2021/12/19 11:45:50 riastradh Exp $"); #include #include @@ -1772,6 +1772,8 @@ static void intel_hdcp_check_work(struct DRM_HDCP_CHECK_PERIOD_MS); } +#ifndef __NetBSD__ /* XXX i915 hdmi audio */ + static int i915_hdcp_component_bind(struct device *i915_kdev, struct device *mei_kdev, void *data) { @@ -1802,6 +1804,8 @@ static const struct component_ops i915_h .unbind = i915_hdcp_component_unbind, }; +#endif + static inline enum mei_fw_ddi intel_get_mei_fw_ddi_index(enum port port) { @@ -1890,8 +1894,12 @@ void intel_hdcp_component_init(struct dr dev_priv->hdcp_comp_added = true; mutex_unlock(&dev_priv->hdcp_comp_mutex); +#ifdef __NetBSD__ /* XXX i915 hdmi audio */ + ret = 0; +#else ret = component_add_typed(dev_priv->drm.dev, &i915_hdcp_component_ops, I915_COMPONENT_HDCP); +#endif if (ret < 0) { DRM_DEBUG_KMS("Failed at component add(%d)\n", ret); mutex_lock(&dev_priv->hdcp_comp_mutex); Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c:1.3 Sun Dec 19 11:45:01 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c Sun Dec 19 11:45:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_hdmi.c,v 1.3 2021/12/19 11:45:01 riastradh Exp $ */ +/* $NetBSD: intel_hdmi.c,v 1.4 2021/12/19 11:45:50 riastradh Exp $ */ /* * Copyright 2006 Dave Airlie @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_hdmi.c,v 1.3 2021/12/19 11:45:01 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_hdmi.c,v 1.4 2021/12/19 11:45:50 riastradh Exp $"); #include #include @@ -2382,7 +2382,8 @@ static bool intel_hdmi_limited_color_ran const struct drm_connector_state *conn_state) { const struct intel_digital_connector_state *intel_conn_state = - to_intel_digital_connector_state(conn_state); + const_container_of(conn_state, + struct intel_digital_connector_state, base); const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:45:50 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_hdcp.c intel_hdmi.c Log Message: i915: tweak hdmi To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdcp.c \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_hdmi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:39:45 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_fbdev.c Log Message: i915: Work around current_is_async. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.6 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.7 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.6 Sun Dec 19 11:39:32 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c Sun Dec 19 11:39:45 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_fbdev.c,v 1.6 2021/12/19 11:39:32 riastradh Exp $ */ +/* $NetBSD: intel_fbdev.c,v 1.7 2021/12/19 11:39:45 riastradh Exp $ */ /* * Copyright © 2007 David Airlie @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.6 2021/12/19 11:39:32 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.7 2021/12/19 11:39:45 riastradh Exp $"); #include #include @@ -568,7 +568,9 @@ void intel_fbdev_unregister(struct drm_i return; cancel_work_sync(&dev_priv->fbdev_suspend_work); +#ifndef __NetBSD__ /* XXX fb async */ if (!current_is_async()) +#endif intel_fbdev_sync(ifbdev); drm_fb_helper_unregister_fbi(&ifbdev->helper);
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:39:45 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_fbdev.c Log Message: i915: Work around current_is_async. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:38:53 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_fbdev.c Log Message: i915_ggtt_offset returns u32, so printf a 32bit sized thing. Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.5 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c:1.4 Sun Dec 19 11:38:46 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c Sun Dec 19 11:38:53 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_fbdev.c,v 1.4 2021/12/19 11:38:46 riastradh Exp $ */ +/* $NetBSD: intel_fbdev.c,v 1.5 2021/12/19 11:38:53 riastradh Exp $ */ /* * Copyright © 2007 David Airlie @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.4 2021/12/19 11:38:46 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_fbdev.c,v 1.5 2021/12/19 11:38:53 riastradh Exp $"); #include #include @@ -315,7 +315,7 @@ static int intelfb_create(struct drm_fb_ /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */ - DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08"PRIx64"\n", + DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08"PRIx32"\n", ifbdev->fb->base.width, ifbdev->fb->base.height, i915_ggtt_offset(vma)); ifbdev->vma = vma;
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:38:53 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_fbdev.c Log Message: i915_ggtt_offset returns u32, so printf a 32bit sized thing. Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_fbdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:16:17 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_acpi.h Log Message: i915: Add missing parameter name. XXX Shouldn't be getting here -- CONFIG_ACPI busted? To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h:1.3 Sun Dec 19 10:25:15 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h Sun Dec 19 11:16:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_acpi.h,v 1.3 2021/12/19 10:25:15 riastradh Exp $ */ +/* $NetBSD: intel_acpi.h,v 1.4 2021/12/19 11:16:17 riastradh Exp $ */ /* SPDX-License-Identifier: MIT */ /* @@ -19,7 +19,7 @@ void intel_register_dsm_handler(void); void intel_unregister_dsm_handler(void); #else #ifdef __NetBSD__ -static inline void intel_register_dsm_handler(struct drm_i915_private *) { return; } +static inline void intel_register_dsm_handler(struct drm_i915_private *i915) { return; } #else static inline void intel_register_dsm_handler(void) { return; } #endif
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:16:17 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_acpi.h Log Message: i915: Add missing parameter name. XXX Shouldn't be getting here -- CONFIG_ACPI busted? To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:12:29 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.h Log Message: Take advantage of sys/file.h include guards, to make sure that including sys/file.h after this header is safe. Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.3 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.4 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.3 Sun Dec 19 09:59:05 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Sun Dec 19 11:12:29 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display.h,v 1.3 2021/12/19 09:59:05 riastradh Exp $ */ +/* $NetBSD: intel_display.h,v 1.4 2021/12/19 11:12:29 riastradh Exp $ */ /* * Copyright © 2006-2019 Intel Corporation @@ -92,6 +92,7 @@ enum i915_gpio { * * XXX Yes, this is disgusting. Sorry. */ +#include #define pipe pipe_drmhack /* * Keep the pipe enum values fixed: the code assumes that PIPE_A=0, the
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:12:29 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.h Log Message: Take advantage of sys/file.h include guards, to make sure that including sys/file.h after this header is safe. Author: Maya Rashish Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 10:25:08 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_vga.c Log Message: Restore vga ifdefs lost in merge. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_vga.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_vga.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_vga.c:1.2 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_vga.c:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_vga.c:1.2 Sat Dec 18 23:45:30 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_vga.c Sun Dec 19 10:25:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_vga.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $ */ +/* $NetBSD: intel_vga.c,v 1.3 2021/12/19 10:25:07 riastradh Exp $ */ // SPDX-License-Identifier: MIT /* @@ -6,7 +6,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_vga.c,v 1.2 2021/12/18 23:45:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_vga.c,v 1.3 2021/12/19 10:25:07 riastradh Exp $"); #include #include @@ -146,6 +146,7 @@ intel_vga_set_state(struct drm_i915_priv return 0; } +#ifndef __NetBSD__ static unsigned int intel_vga_set_decode(void *cookie, bool enable_decode) { @@ -159,9 +160,11 @@ intel_vga_set_decode(void *cookie, bool else return VGA_RSRC_NORMAL_IO | VGA_RSRC_NORMAL_MEM; } +#endif /* __NetBSD__ */ int intel_vga_register(struct drm_i915_private *i915) { +#ifndef __NetBSD__ struct pci_dev *pdev = i915->drm.pdev; int ret; @@ -176,13 +179,16 @@ int intel_vga_register(struct drm_i915_p ret = vga_client_register(pdev, i915, NULL, intel_vga_set_decode); if (ret && ret != -ENODEV) return ret; +#endif return 0; } void intel_vga_unregister(struct drm_i915_private *i915) { +#ifndef __NetBSD__ struct pci_dev *pdev = i915->drm.pdev; vga_client_register(pdev, NULL, NULL, NULL); +#endif /* __NetBSD__ */ }
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 10:25:08 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_vga.c Log Message: Restore vga ifdefs lost in merge. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_vga.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 09:59:05 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.h Log Message: Re-introduce: Hackily rename enum pipe for drm, without patching. The patch we used to maintain to do this rename doubled the pain of merging drm updates. But ctf gets confused if we have a struct and an enum both called `pipe', and it's technically against C99 to do so. So #define it in all drm code for now to fix dtrace. Author: Maya Rashish To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h diff -u src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.2 src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.3 --- src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h:1.2 Sat Dec 18 23:45:29 2021 +++ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Sun Dec 19 09:59:05 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_display.h,v 1.2 2021/12/18 23:45:29 riastradh Exp $ */ +/* $NetBSD: intel_display.h,v 1.3 2021/12/19 09:59:05 riastradh Exp $ */ /* * Copyright © 2006-2019 Intel Corporation @@ -77,6 +77,23 @@ enum i915_gpio { }; /* + * NetBSD already has struct pipe, and according to C99 6.2.3 there's + * only one namespace for struct, union, and enum tags, but the i915 + * driver wants a type called enum pipe. + * + * So rename it to avoid conflicts which confuse tools like ctfmerge -- + * but make sure we include first to avoid having two + * different versions of struct file, one with a pointer to struct pipe + * and another with a pointer to struct i915_pipe. + * + * This will cause trouble if we ever have an API that involves `pipe' + * as a member which we need to reference from within drm code. But + * for now that is not the case. + * + * XXX Yes, this is disgusting. Sorry. + */ +#define pipe pipe_drmhack +/* * Keep the pipe enum values fixed: the code assumes that PIPE_A=0, the * rest have consecutive values and match the enum values of transcoders * with a 1:1 transcoder -> pipe mapping.
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915/display
Module Name:src Committed By: riastradh Date: Sun Dec 19 09:59:05 UTC 2021 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915/display: intel_display.h Log Message: Re-introduce: Hackily rename enum pipe for drm, without patching. The patch we used to maintain to do this rename doubled the pain of merging drm updates. But ctf gets confused if we have a struct and an enum both called `pipe', and it's technically against C99 to do so. So #define it in all drm code for now to fix dtrace. Author: Maya Rashish To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/sys/external/bsd/drm2/dist/drm/i915/display/intel_display.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.