Commit 4e996697 authored by Daniel Vetter's avatar Daniel Vetter

Merge tag 'drm-misc-next-2024-08-09' of...

Merge tag 'drm-misc-next-2024-08-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next

drm-misc-next for v6.12:

UAPI Changes:

- remove Power Saving Policy property

Core Changes:

- update connector documentation

CI:
- add tests for mediatek, meson, rockchip

Driver Changes:

amdgpu:
- revert support for Power Saving Policy property

bridge:
- lt9611uxc: require DRM_BRIDGE_ATTACH_NO_CONNECTOR

mgag200:
- transparently support BMC outputs

omapdrm:
- use common helper for_each_endpoint_of_node()

panel:
- panel-edp: fix name for HKC MB116AN01

vkms:
- clean up endianess warnings
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240809071241.GA222501@localhost.localdomain
parents 91dae758 219b45d0
......@@ -1761,6 +1761,7 @@ L: dri-devel@lists.freedesktop.org
S: Supported
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/gpu/panfrost.rst
F: drivers/gpu/drm/ci/xfails/panfrost*
F: drivers/gpu/drm/panfrost/
F: include/uapi/drm/panfrost_drm.h
......@@ -10971,6 +10972,7 @@ T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml
F: Documentation/devicetree/bindings/gpu/img,powervr-sgx.yaml
F: Documentation/gpu/imagination/
F: drivers/gpu/drm/ci/xfails/powervr*
F: drivers/gpu/drm/imagination/
F: include/uapi/drm/pvr_drm.h
......
......@@ -1407,10 +1407,6 @@ int amdgpu_display_modeset_create_props(struct amdgpu_device *adev)
"dither",
amdgpu_dither_enum_list, sz);
if (adev->dc_enabled)
drm_mode_create_power_saving_policy_property(adev_to_drm(adev),
DRM_MODE_POWER_SAVING_POLICY_ALL);
return 0;
}
......
......@@ -6725,14 +6725,6 @@ int amdgpu_dm_connector_atomic_set_property(struct drm_connector *connector,
} else if (property == adev->mode_info.underscan_property) {
dm_new_state->underscan_enable = val;
ret = 0;
} else if (property == dev->mode_config.power_saving_policy) {
dm_new_state->abm_forbidden = val & DRM_MODE_REQUIRE_COLOR_ACCURACY;
dm_new_state->abm_level = (dm_new_state->abm_forbidden ||
!dm_old_state->abm_level) ?
ABM_LEVEL_IMMEDIATE_DISABLE :
dm_old_state->abm_level;
dm_new_state->psr_forbidden = val & DRM_MODE_REQUIRE_LOW_LATENCY;
ret = 0;
}
return ret;
......@@ -6775,13 +6767,6 @@ int amdgpu_dm_connector_atomic_get_property(struct drm_connector *connector,
} else if (property == adev->mode_info.underscan_property) {
*val = dm_state->underscan_enable;
ret = 0;
} else if (property == dev->mode_config.power_saving_policy) {
*val = 0;
if (dm_state->psr_forbidden)
*val |= DRM_MODE_REQUIRE_LOW_LATENCY;
if (dm_state->abm_forbidden)
*val |= DRM_MODE_REQUIRE_COLOR_ACCURACY;
ret = 0;
}
return ret;
......@@ -6808,12 +6793,9 @@ static ssize_t panel_power_savings_show(struct device *device,
u8 val;
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
if (to_dm_connector_state(connector->state)->abm_forbidden)
val = 0;
else
val = to_dm_connector_state(connector->state)->abm_level ==
ABM_LEVEL_IMMEDIATE_DISABLE ? 0 :
to_dm_connector_state(connector->state)->abm_level;
val = to_dm_connector_state(connector->state)->abm_level ==
ABM_LEVEL_IMMEDIATE_DISABLE ? 0 :
to_dm_connector_state(connector->state)->abm_level;
drm_modeset_unlock(&dev->mode_config.connection_mutex);
return sysfs_emit(buf, "%u\n", val);
......@@ -6837,16 +6819,10 @@ static ssize_t panel_power_savings_store(struct device *device,
return -EINVAL;
drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
if (to_dm_connector_state(connector->state)->abm_forbidden)
ret = -EBUSY;
else
to_dm_connector_state(connector->state)->abm_level = val ?:
ABM_LEVEL_IMMEDIATE_DISABLE;
to_dm_connector_state(connector->state)->abm_level = val ?:
ABM_LEVEL_IMMEDIATE_DISABLE;
drm_modeset_unlock(&dev->mode_config.connection_mutex);
if (ret)
return ret;
drm_kms_helper_hotplug_event(dev);
return count;
......@@ -8040,14 +8016,6 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
aconnector->base.state->max_bpc = 16;
aconnector->base.state->max_requested_bpc = aconnector->base.state->max_bpc;
if (connector_type == DRM_MODE_CONNECTOR_eDP &&
(dc_is_dmcu_initialized(adev->dm.dc) ||
adev->dm.dc->ctx->dmub_srv)) {
drm_object_attach_property(&aconnector->base.base,
dm->ddev->mode_config.power_saving_policy,
0);
}
if (connector_type == DRM_MODE_CONNECTOR_HDMIA) {
/* Content Type is currently only implemented for HDMI. */
drm_connector_attach_content_type_property(&aconnector->base);
......@@ -9748,7 +9716,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state);
struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc);
struct dc_surface_update *dummy_updates;
struct dc_stream_update stream_update;
......@@ -9802,15 +9769,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
stream_update.hdr_static_metadata = &hdr_packet;
}
aconnector->disallow_edp_enter_psr = dm_new_con_state->psr_forbidden;
/* immediately disable PSR if disallowed */
if (aconnector->disallow_edp_enter_psr) {
mutex_lock(&dm->dc_lock);
amdgpu_dm_psr_disable(dm_new_crtc_state->stream);
mutex_unlock(&dm->dc_lock);
}
status = dc_stream_get_status(dm_new_crtc_state->stream);
if (WARN_ON(!status))
......
......@@ -915,8 +915,6 @@ struct dm_connector_state {
bool underscan_enable;
bool freesync_capable;
bool update_hdcp;
bool abm_forbidden;
bool psr_forbidden;
uint8_t abm_level;
int vcpi_slots;
uint64_t pbn;
......
......@@ -23,6 +23,7 @@
#include <drm/drm_bridge.h>
#include <drm/drm_edid.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_of.h>
#include <drm/drm_print.h>
#include <drm/drm_probe_helper.h>
......@@ -34,7 +35,7 @@
struct lt9611uxc {
struct device *dev;
struct drm_bridge bridge;
struct drm_connector connector;
struct drm_bridge *next_bridge;
struct regmap *regmap;
/* Protects all accesses to registers by stopping the on-chip MCU */
......@@ -120,11 +121,6 @@ static struct lt9611uxc *bridge_to_lt9611uxc(struct drm_bridge *bridge)
return container_of(bridge, struct lt9611uxc, bridge);
}
static struct lt9611uxc *connector_to_lt9611uxc(struct drm_connector *connector)
{
return container_of(connector, struct lt9611uxc, connector);
}
static void lt9611uxc_lock(struct lt9611uxc *lt9611uxc)
{
mutex_lock(&lt9611uxc->ocm_lock);
......@@ -171,20 +167,14 @@ static void lt9611uxc_hpd_work(struct work_struct *work)
struct lt9611uxc *lt9611uxc = container_of(work, struct lt9611uxc, work);
bool connected;
if (lt9611uxc->connector.dev) {
if (lt9611uxc->connector.dev->mode_config.funcs)
drm_kms_helper_hotplug_event(lt9611uxc->connector.dev);
} else {
mutex_lock(&lt9611uxc->ocm_lock);
connected = lt9611uxc->hdmi_connected;
mutex_unlock(&lt9611uxc->ocm_lock);
mutex_lock(&lt9611uxc->ocm_lock);
connected = lt9611uxc->hdmi_connected;
mutex_unlock(&lt9611uxc->ocm_lock);
drm_bridge_hpd_notify(&lt9611uxc->bridge,
connected ?
connector_status_connected :
connector_status_disconnected);
}
drm_bridge_hpd_notify(&lt9611uxc->bridge,
connected ?
connector_status_connected :
connector_status_disconnected);
}
static void lt9611uxc_reset(struct lt9611uxc *lt9611uxc)
......@@ -289,82 +279,13 @@ static struct mipi_dsi_device *lt9611uxc_attach_dsi(struct lt9611uxc *lt9611uxc,
return dsi;
}
static int lt9611uxc_connector_get_modes(struct drm_connector *connector)
{
struct lt9611uxc *lt9611uxc = connector_to_lt9611uxc(connector);
const struct drm_edid *drm_edid;
int count;
drm_edid = drm_bridge_edid_read(&lt9611uxc->bridge, connector);
drm_edid_connector_update(connector, drm_edid);
count = drm_edid_connector_add_modes(connector);
drm_edid_free(drm_edid);
return count;
}
static enum drm_connector_status lt9611uxc_connector_detect(struct drm_connector *connector,
bool force)
{
struct lt9611uxc *lt9611uxc = connector_to_lt9611uxc(connector);
return lt9611uxc->bridge.funcs->detect(&lt9611uxc->bridge);
}
static enum drm_mode_status lt9611uxc_connector_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct lt9611uxc_mode *lt9611uxc_mode = lt9611uxc_find_mode(mode);
return lt9611uxc_mode ? MODE_OK : MODE_BAD;
}
static const struct drm_connector_helper_funcs lt9611uxc_bridge_connector_helper_funcs = {
.get_modes = lt9611uxc_connector_get_modes,
.mode_valid = lt9611uxc_connector_mode_valid,
};
static const struct drm_connector_funcs lt9611uxc_bridge_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.detect = lt9611uxc_connector_detect,
.destroy = drm_connector_cleanup,
.reset = drm_atomic_helper_connector_reset,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
};
static int lt9611uxc_connector_init(struct drm_bridge *bridge, struct lt9611uxc *lt9611uxc)
{
int ret;
lt9611uxc->connector.polled = DRM_CONNECTOR_POLL_HPD;
drm_connector_helper_add(&lt9611uxc->connector,
&lt9611uxc_bridge_connector_helper_funcs);
ret = drm_connector_init(bridge->dev, &lt9611uxc->connector,
&lt9611uxc_bridge_connector_funcs,
DRM_MODE_CONNECTOR_HDMIA);
if (ret) {
DRM_ERROR("Failed to initialize connector with drm\n");
return ret;
}
return drm_connector_attach_encoder(&lt9611uxc->connector, bridge->encoder);
}
static int lt9611uxc_bridge_attach(struct drm_bridge *bridge,
enum drm_bridge_attach_flags flags)
{
struct lt9611uxc *lt9611uxc = bridge_to_lt9611uxc(bridge);
int ret;
if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) {
ret = lt9611uxc_connector_init(bridge, lt9611uxc);
if (ret < 0)
return ret;
}
return 0;
return drm_bridge_attach(bridge->encoder, lt9611uxc->next_bridge,
bridge, flags);
}
static enum drm_mode_status
......@@ -525,7 +446,7 @@ static int lt9611uxc_parse_dt(struct device *dev,
lt9611uxc->dsi1_node = of_graph_get_remote_node(dev->of_node, 1, -1);
return 0;
return drm_of_find_panel_or_bridge(dev->of_node, 2, -1, NULL, &lt9611uxc->next_bridge);
}
static int lt9611uxc_gpio_init(struct lt9611uxc *lt9611uxc)
......
......@@ -187,6 +187,7 @@ CONFIG_MTK_DEVAPC=y
CONFIG_PWM_MTK_DISP=y
CONFIG_MTK_CMDQ=y
CONFIG_REGULATOR_DA9211=y
CONFIG_DRM_ANALOGIX_ANX7625=y
# For nouveau. Note that DRM must be a module so that it's loaded after NFS is up to provide the firmware.
CONFIG_ARCH_TEGRA=y
......
......@@ -121,8 +121,9 @@ stages:
- mediatek
- meson
- msm
- panfrost
- powervr
- rockchip
- virtio-gpu
- software-driver
# YAML anchors for rule conditions
......
......@@ -20,16 +20,6 @@ cat /sys/kernel/debug/dri/*/state
set -e
case "$DRIVER_NAME" in
rockchip|meson)
export IGT_FORCE_DRIVER="panfrost"
;;
mediatek)
if [ "$GPU_VERSION" = "mt8173" ]; then
export IGT_FORCE_DRIVER=${DRIVER_NAME}
elif [ "$GPU_VERSION" = "mt8183" ]; then
export IGT_FORCE_DRIVER="panfrost"
fi
;;
amdgpu|vkms)
# Cannot use HWCI_KERNEL_MODULES as at that point we don't have the module in /lib
mv /install/modules/lib/modules/* /lib/modules/. || true
......
......@@ -160,33 +160,57 @@ msm:sdm845:
script:
- ./install/bare-metal/cros-servo.sh
rockchip:rk3288:
extends:
- .lava-igt:arm32
.rockchip-device:
variables:
DTB: ${DEVICE_TYPE}
BOOT_METHOD: depthcharge
.rockchip-display:
stage: rockchip
variables:
DRIVER_NAME: rockchip
.rk3288:
extends:
- .lava-igt:arm32
- .rockchip-device
variables:
DEVICE_TYPE: rk3288-veyron-jaq
DTB: ${DEVICE_TYPE}
BOOT_METHOD: depthcharge
KERNEL_IMAGE_TYPE: "zimage"
GPU_VERSION: rk3288
KERNEL_IMAGE_TYPE: "zimage"
RUNNER_TAG: mesa-ci-x86-64-lava-rk3288-veyron-jaq
rockchip:rk3399:
.rk3399:
extends:
- .lava-igt:arm64
stage: rockchip
- .rockchip-device
parallel: 2
variables:
DRIVER_NAME: rockchip
DEVICE_TYPE: rk3399-gru-kevin
DTB: ${DEVICE_TYPE}
BOOT_METHOD: depthcharge
KERNEL_IMAGE_TYPE: ""
GPU_VERSION: rk3399
KERNEL_IMAGE_TYPE: ""
RUNNER_TAG: mesa-ci-x86-64-lava-rk3399-gru-kevin
rockchip:rk3288:
extends:
- .rk3288
- .rockchip-display
panfrost:rk3288:
extends:
- .rk3288
- .panfrost-gpu
rockchip:rk3399:
extends:
- .rk3399
- .rockchip-display
panfrost:rk3399:
extends:
- .rk3399
- .panfrost-gpu
.i915:
extends:
- .lava-igt:x86_64
......@@ -280,63 +304,114 @@ amdgpu:stoney:
GPU_VERSION: stoney
RUNNER_TAG: mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
.mediatek:
.mediatek-device:
extends:
- .lava-igt:arm64
stage: mediatek
variables:
DRIVER_NAME: mediatek
DTB: ${DEVICE_TYPE}
BOOT_METHOD: depthcharge
KERNEL_IMAGE_TYPE: ""
mediatek:mt8173:
.mediatek-display:
stage: mediatek
variables:
DRIVER_NAME: mediatek
.powervr-gpu:
stage: powervr
variables:
DRIVER_NAME: powervr
.panfrost-gpu:
stage: panfrost
variables:
DRIVER_NAME: panfrost
.mt8173:
extends:
- .mediatek
- .mediatek-device
parallel: 4
variables:
DEVICE_TYPE: mt8173-elm-hana
GPU_VERSION: mt8173
RUNNER_TAG: mesa-ci-x86-64-lava-mt8173-elm-hana
mediatek:mt8183:
.mt8183:
extends:
- .mediatek
- .mediatek-device
parallel: 3
variables:
DEVICE_TYPE: mt8183-kukui-jacuzzi-juniper-sku16
GPU_VERSION: mt8183
RUNNER_TAG: mesa-ci-x86-64-lava-mt8183-kukui-jacuzzi-juniper-sku16
mediatek:mt8173:
extends:
- .mt8173
- .mediatek-display
powervr:mt8173:
extends:
- .mt8173
- .powervr-gpu
rules:
# TODO: powervr driver was merged in linux kernel, but there's no mediatek support yet
# Remove the rule once mediatek support is added for powervr
- when: never
mediatek:mt8183:
extends:
- .mt8183
- .mediatek-display
panfrost:mt8183:
extends:
- .mt8183
- .panfrost-gpu
# drm-mtk doesn't even probe yet in mainline for mt8192
.mediatek:mt8192:
extends:
- .mediatek
- .mediatek-device
parallel: 3
variables:
DEVICE_TYPE: mt8192-asurada-spherion-r0
GPU_VERSION: mt8192
RUNNER_TAG: mesa-ci-x86-64-lava-mt8192-asurada-spherion-r0
.meson:
.meson-device:
extends:
- .lava-igt:arm64
stage: meson
variables:
DRIVER_NAME: meson
DTB: ${DEVICE_TYPE}
BOOT_METHOD: u-boot
KERNEL_IMAGE_TYPE: "image"
meson:g12b:
.meson-display:
stage: meson
variables:
DRIVER_NAME: meson
.g12b:
extends:
- .meson
- .meson-device
parallel: 3
variables:
DEVICE_TYPE: meson-g12b-a311d-khadas-vim3
GPU_VERSION: g12b
RUNNER_TAG: mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3
meson:g12b:
extends:
- .g12b
- .meson-display
panfrost:g12b:
extends:
- .g12b
- .panfrost-gpu
virtio_gpu:none:
stage: software-driver
variables:
......
......@@ -38,4 +38,3 @@ kms_plane@pixel-format,Fail
kms_plane_cursor@primary,Fail
kms_rotation_crc@primary-rotation-180,Fail
perf@i915-ref-count,Fail
tools_test@tools_test,Fail
......@@ -13,6 +13,7 @@ nouveau_.*
gem_.*
i915_.*
xe_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
......@@ -34,4 +34,3 @@ kms_properties@get_properties-sanity-atomic,Fail
kms_properties@plane-properties-atomic,Fail
kms_properties@plane-properties-legacy,Fail
kms_rmfb@close-fd,Fail
tools_test@tools_test,Fail
......@@ -10,6 +10,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
dumb_buffer@create-clear,Fail
dumb_buffer@create-valid-dumb,Fail
core_setmaster@master-drop-set-shared-fd,Fail
device_reset@cold-reset-bound,Fail
device_reset@reset-bound,Fail
device_reset@unbind-cold-reset-rebind,Fail
device_reset@unbind-reset-rebind,Fail
dumb_buffer@create-clear,Crash
dumb_buffer@invalid-bpp,Fail
dumb_buffer@map-invalid-size,Fail
dumb_buffer@map-uaf,Fail
dumb_buffer@map-valid,Fail
panfrost/panfrost_prime@gem-prime-import,Fail
tools_test@tools_test,Fail
fbdev@eof,Fail
fbdev@pan,Fail
fbdev@read,Fail
fbdev@unaligned-read,Fail
kms_bw@connected-linear-tiling-1-displays-1920x1080p,Fail
kms_bw@connected-linear-tiling-1-displays-2160x1440p,Fail
kms_bw@connected-linear-tiling-1-displays-2560x1440p,Fail
kms_bw@linear-tiling-1-displays-1920x1080p,Fail
kms_bw@linear-tiling-1-displays-3840x2160p,Fail
kms_color@invalid-gamma-lut-sizes,Fail
kms_flip@flip-vs-panning-vs-hang,Fail
kms_flip@flip-vs-suspend,Fail
kms_lease@lease-uevent,Fail
kms_properties@plane-properties-atomic,Fail
kms_rmfb@close-fd,Fail
# Board Name: mt8183-kukui-jacuzzi-juniper-sku16
# Bug Report: https://lore.kernel.org/linux-mediatek/0b2a1899-15dd-42fa-8f63-ea0ca28dbb17@collabora.com/T/#u
# Failure Rate: 100
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_bw@linear-tiling-1-displays-2560x1440p
# Board Name: mt8183-kukui-jacuzzi-juniper-sku16
# Bug Report: https://lore.kernel.org/linux-mediatek/0b2a1899-15dd-42fa-8f63-ea0ca28dbb17@collabora.com/T/#u
# Failure Rate: 100
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_cursor_legacy@cursor-vs-flip-atomic-transitions
# Board Name: mt8183-kukui-jacuzzi-juniper-sku16
# Bug Report: https://lore.kernel.org/linux-mediatek/0b2a1899-15dd-42fa-8f63-ea0ca28dbb17@collabora.com/T/#u
# Failure Rate: 100
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
fbdev@write
......@@ -2,6 +2,7 @@
^amdgpu.*
^msm.*
nouveau_.*
^panfrost.*
^v3d.*
^vc4.*
^vmwgfx*
......@@ -9,9 +10,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
# Panfrost is not a KMS driver, so skip the KMS tests
kms_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
dumb_buffer@create-clear,Fail
dumb_buffer@create-valid-dumb,Fail
dumb_buffer@invalid-bpp,Fail
dumb_buffer@map-invalid-size,Fail
dumb_buffer@map-uaf,Fail
dumb_buffer@map-valid,Fail
panfrost/panfrost_prime@gem-prime-import,Fail
tools_test@tools_test,Fail
kms_3d,Fail
kms_cursor_legacy@forked-bo,Fail
kms_cursor_legacy@forked-move,Fail
kms_cursor_legacy@single-bo,Fail
kms_cursor_legacy@single-move,Fail
kms_cursor_legacy@torture-bo,Fail
kms_cursor_legacy@torture-move,Fail
kms_lease@lease-uevent,Fail
kms_properties@connector-properties-atomic,Fail
kms_properties@connector-properties-legacy,Fail
kms_properties@get_properties-sanity-atomic,Fail
kms_properties@get_properties-sanity-non-atomic,Fail
......@@ -2,6 +2,7 @@
^amdgpu.*
^msm.*
nouveau_.*
^panfrost.*
^v3d.*
^vc4.*
^vmwgfx*
......@@ -9,9 +10,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
# Panfrost is not a KMS driver, so skip the KMS tests
kms_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
......@@ -9,4 +9,3 @@ kms_force_connector_basic@force-edid,Fail
kms_hdmi_inject@inject-4k,Fail
kms_lease@lease-uevent,Fail
msm/msm_mapping@ring,Fail
tools_test@tools_test,Fail
......@@ -9,6 +9,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
......@@ -5,4 +5,3 @@ device_reset@unbind-reset-rebind,Fail
dumb_buffer@invalid-bpp,Fail
kms_3d,Fail
kms_lease@lease-uevent,Fail
tools_test@tools_test,Fail
......@@ -12,6 +12,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
......@@ -43,4 +43,3 @@ kms_plane_alpha_blend@coverage-vs-premult-vs-constant,Fail
kms_plane_lowres@tiling-none,Fail
kms_rmfb@close-fd,Fail
kms_vblank@ts-continuation-dpms-rpm,Fail
tools_test@tools_test,Fail
......@@ -12,6 +12,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
......@@ -43,4 +43,3 @@ kms_plane_alpha_blend@coverage-vs-premult-vs-constant,Fail
kms_plane_lowres@tiling-none,Fail
kms_rmfb@close-fd,Fail
kms_vblank@ts-continuation-dpms-rpm,Fail
tools_test@tools_test,Fail
......@@ -12,6 +12,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
......@@ -33,4 +33,3 @@ kms_plane_alpha_blend@coverage-vs-premult-vs-constant,Fail
kms_plane_cursor@overlay,Fail
kms_plane_cursor@viewport,Fail
kms_rmfb@close-fd,Fail
tools_test@tools_test,Fail
......@@ -17,6 +17,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
panfrost/panfrost_prime@gem-prime-import,Fail
# Skip driver specific tests
^amdgpu.*
^msm.*
nouveau_.*
^v3d.*
^vc4.*
^vmwgfx*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Panfrost is not a KMS driver, so skip the KMS tests
kms_.*
# Skip display functionality tests for GPU-only drivers
dumb_buffer.*
fbdev.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
core_hotunplug.*
panfrost/panfrost_prime@gem-prime-import,Fail
# Skip driver specific tests
^amdgpu.*
^msm.*
nouveau_.*
^v3d.*
^vc4.*
^vmwgfx*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Panfrost is not a KMS driver, so skip the KMS tests
kms_.*
# Skip display functionality tests for GPU-only drivers
dumb_buffer.*
fbdev.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
core_hotunplug.*
panfrost/panfrost_prime@gem-prime-import,Crash
# Suspend to RAM seems to be broken on this machine
.*suspend.*
# Skip driver specific tests
^amdgpu.*
^msm.*
nouveau_.*
^v3d.*
^vc4.*
^vmwgfx*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Panfrost is not a KMS driver, so skip the KMS tests
kms_.*
# Skip display functionality tests for GPU-only drivers
dumb_buffer.*
fbdev.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
core_hotunplug.*
panfrost/panfrost_prime@gem-prime-import,Fail
# Board Name: rk3399-gru-kevin
# Bug Report: https://lore.kernel.org/dri-devel/5cc34a8b-c1fa-4744-9031-2d33ecf41011@collabora.com/T/#u
# Failure Rate: 50
# IGT Version: 1.28-g0df7b9b97
# Linux Version: 6.9.0-rc7
panfrost/panfrost_submit@pan-unhandled-pagefault
# Suspend to RAM seems to be broken on this machine
.*suspend.*
# Skip driver specific tests
^amdgpu.*
^msm.*
nouveau_.*
^v3d.*
^vc4.*
^vmwgfx*
# Skip intel specific tests
gem_.*
i915_.*
tools_test.*
# Panfrost is not a KMS driver, so skip the KMS tests
kms_.*
# Skip display functionality tests for GPU-only drivers
dumb_buffer.*
fbdev.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
core_hotunplug.*
core_setmaster@master-drop-set-root,Crash
core_setmaster@master-drop-set-user,Crash
core_setmaster_vs_auth,Crash
device_reset@cold-reset-bound,Crash
device_reset@reset-bound,Crash
device_reset@unbind-cold-reset-rebind,Crash
device_reset@unbind-reset-rebind,Crash
dumb_buffer@create-clear,Crash
dumb_buffer@create-valid-dumb,Crash
dumb_buffer@invalid-bpp,Crash
dumb_buffer@map-invalid-size,Crash
dumb_buffer@map-uaf,Crash
dumb_buffer@map-valid,Crash
panfrost/panfrost_prime@gem-prime-import,Crash
tools_test@tools_test,Crash
fbdev@pan,Crash
kms_cursor_crc@cursor-onscreen-32x10,Crash
kms_cursor_crc@cursor-onscreen-32x32,Crash
kms_cursor_crc@cursor-random-32x10,Crash
kms_cursor_crc@cursor-sliding-32x32,Crash
kms_cursor_legacy@basic-flip-before-cursor-atomic,Fail
kms_cursor_legacy@cursor-vs-flip-legacy,Fail
kms_prop_blob@invalid-set-prop,Crash
kms_prop_blob@invalid-set-prop-any,Crash
# Board Name: rk3288-veyron-jaq
# Bug Report: https://lore.kernel.org/linux-rockchip/3e267d0c-fde4-4533-b001-6ab7d7c03546@collabora.com/T/#u
# Failure Rate: 100
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_cursor_legacy@flip-vs-cursor-atomic
# Suspend to RAM seems to be broken on this machine
.*suspend.*
# Too unstable, machine ends up hanging after lots of Oopses
kms_cursor_legacy.*
# Started hanging the machine on Linux 5.19-rc2:
#
# [IGT] kms_plane_lowres: executing
# [IGT] kms_plane_lowres: starting subtest pipe-F-tiling-y
# [IGT] kms_plane_lowres: exiting, ret=77
# Console: switching to colour frame buffer device 170x48
# rockchip-drm display-subsystem: [drm] *ERROR* flip_done timed out
# rockchip-drm display-subsystem: [drm] *ERROR* [CRTC:35:crtc-0] commit wait timed out
# BUG: spinlock bad magic on CPU#3, kms_plane_lowre/482
# 8<--- cut here ---
# Unable to handle kernel paging request at virtual address 7812078e
# [7812078e] *pgd=00000000
# Internal error: Oops: 5 [#1] SMP ARM
# Modules linked in:
# CPU: 3 PID: 482 Comm: kms_plane_lowre Tainted: G W 5.19.0-rc2-323596-g00535de92171 #1
# Hardware name: Rockchip (Device Tree)
# Process kms_plane_lowre (pid: 482, stack limit = 0x1193ac2b)
# spin_dump from do_raw_spin_lock+0xa4/0xe8
# do_raw_spin_lock from wait_for_completion_timeout+0x2c/0x120
# wait_for_completion_timeout from drm_crtc_commit_wait+0x18/0x7c
# drm_crtc_commit_wait from drm_atomic_helper_wait_for_dependencies+0x44/0x168
# drm_atomic_helper_wait_for_dependencies from commit_tail+0x34/0x180
# commit_tail from drm_atomic_helper_commit+0x164/0x18c
# drm_atomic_helper_commit from drm_atomic_commit+0xac/0xe4
# drm_atomic_commit from drm_client_modeset_commit_atomic+0x23c/0x284
# drm_client_modeset_commit_atomic from drm_client_modeset_commit_locked+0x60/0x1c8
# drm_client_modeset_commit_locked from drm_client_modeset_commit+0x24/0x40
# drm_client_modeset_commit from drm_fbdev_client_restore+0x58/0x94
# drm_fbdev_client_restore from drm_client_dev_restore+0x70/0xbc
# drm_client_dev_restore from drm_release+0xf4/0x114
# drm_release from __fput+0x74/0x240
# __fput from task_work_run+0x84/0xb4
# task_work_run from do_exit+0x34c/0xa20
# do_exit from do_group_exit+0x34/0x98
# do_group_exit from __wake_up_parent+0x0/0x18
# Code: e595c008 12843d19 03e00000 03093168 (15940508)
# ---[ end trace 0000000000000000 ]---
# note: kms_plane_lowre[482] exited with preempt_count 1
# Fixing recursive fault but reboot is needed!
kms_plane_lowres@pipe-F-tiling-y
# Take too long, we have only two machines, and these are very flaky
kms_cursor_crc.*
# Machine is hanging in this test, so skip it
kms_pipe_crc_basic@disable-crc-after-crtc
# Skip driver specific tests
^amdgpu.*
^msm.*
nouveau_.*
^panfrost.*
^v3d.*
^vc4.*
^vmwgfx*
......@@ -62,9 +13,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
# Panfrost is not a KMS driver, so skip the KMS tests
kms_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
dumb_buffer@create-clear,Fail
dumb_buffer@create-valid-dumb,Fail
device_reset@cold-reset-bound,Fail
device_reset@reset-bound,Fail
device_reset@unbind-cold-reset-rebind,Fail
device_reset@unbind-reset-rebind,Fail
dumb_buffer@create-clear,Crash
dumb_buffer@invalid-bpp,Fail
dumb_buffer@map-invalid-size,Fail
dumb_buffer@map-uaf,Fail
dumb_buffer@map-valid,Fail
panfrost/panfrost_prime@gem-prime-import,Fail
tools_test@tools_test,Fail
kms_atomic_transition@modeset-transition,Fail
kms_atomic_transition@modeset-transition-fencing,Fail
kms_atomic_transition@plane-toggle-modeset-transition,Fail
kms_color@gamma,Fail
kms_color@legacy-gamma,Fail
kms_cursor_crc@cursor-alpha-opaque,Fail
kms_cursor_crc@cursor-alpha-transparent,Fail
kms_cursor_crc@cursor-dpms,Fail
kms_cursor_crc@cursor-offscreen-32x10,Fail
kms_cursor_crc@cursor-offscreen-32x32,Fail
kms_cursor_crc@cursor-offscreen-64x21,Fail
kms_cursor_crc@cursor-offscreen-64x64,Fail
kms_cursor_crc@cursor-onscreen-32x10,Fail
kms_cursor_crc@cursor-onscreen-32x32,Fail
kms_cursor_crc@cursor-onscreen-64x21,Fail
kms_cursor_crc@cursor-onscreen-64x64,Fail
kms_cursor_crc@cursor-random-32x10,Fail
kms_cursor_crc@cursor-random-32x32,Fail
kms_cursor_crc@cursor-random-64x21,Fail
kms_cursor_crc@cursor-random-64x64,Fail
kms_cursor_crc@cursor-rapid-movement-32x10,Fail
kms_cursor_crc@cursor-rapid-movement-32x32,Fail
kms_cursor_crc@cursor-rapid-movement-64x21,Fail
kms_cursor_crc@cursor-rapid-movement-64x64,Fail
kms_cursor_crc@cursor-size-change,Fail
kms_cursor_crc@cursor-sliding-32x10,Fail
kms_cursor_crc@cursor-sliding-32x32,Fail
kms_cursor_crc@cursor-sliding-64x21,Fail
kms_cursor_crc@cursor-sliding-64x64,Fail
kms_cursor_edge_walk@64x64-left-edge,Fail
kms_cursor_legacy@basic-flip-before-cursor-atomic,Fail
kms_cursor_legacy@basic-flip-before-cursor-legacy,Fail
kms_cursor_legacy@cursor-vs-flip-atomic,Fail
kms_cursor_legacy@cursor-vs-flip-legacy,Fail
kms_cursor_legacy@cursor-vs-flip-toggle,Fail
kms_cursor_legacy@flip-vs-cursor-atomic,Fail
kms_cursor_legacy@flip-vs-cursor-crc-atomic,Fail
kms_cursor_legacy@flip-vs-cursor-crc-legacy,Fail
kms_cursor_legacy@flip-vs-cursor-legacy,Fail
kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic,Fail
kms_flip@basic-flip-vs-wf_vblank,Fail
kms_flip@blocking-wf_vblank,Fail
kms_flip@dpms-vs-vblank-race,Fail
kms_flip@flip-vs-absolute-wf_vblank,Fail
kms_flip@flip-vs-blocking-wf-vblank,Fail
kms_flip@flip-vs-modeset-vs-hang,Fail
kms_flip@flip-vs-panning,Fail
kms_flip@flip-vs-panning-interruptible,Fail
kms_flip@flip-vs-panning-vs-hang,Fail
kms_flip@modeset-vs-vblank-race,Fail
kms_flip@modeset-vs-vblank-race-interruptible,Fail
kms_flip@plain-flip-fb-recreate,Fail
kms_flip@plain-flip-fb-recreate-interruptible,Fail
kms_flip@plain-flip-ts-check,Fail
kms_flip@plain-flip-ts-check-interruptible,Fail
kms_flip@wf_vblank-ts-check,Fail
kms_flip@wf_vblank-ts-check-interruptible,Fail
kms_invalid_mode@int-max-clock,Fail
kms_lease@lease-uevent,Fail
kms_lease@page-flip-implicit-plane,Fail
kms_pipe_crc_basic@compare-crc-sanitycheck-nv12,Fail
kms_pipe_crc_basic@compare-crc-sanitycheck-xr24,Fail
kms_pipe_crc_basic@disable-crc-after-crtc,Fail
kms_pipe_crc_basic@nonblocking-crc,Fail
kms_pipe_crc_basic@nonblocking-crc-frame-sequence,Fail
kms_pipe_crc_basic@read-crc,Fail
kms_pipe_crc_basic@read-crc-frame-sequence,Fail
kms_plane@pixel-format,Crash
kms_plane@pixel-format-source-clamping,Crash
kms_plane@plane-panning-bottom-right,Fail
kms_plane@plane-panning-top-left,Fail
kms_plane@plane-position-covered,Fail
kms_plane@plane-position-hole,Fail
kms_plane@plane-position-hole-dpms,Fail
kms_plane_cursor@primary,Fail
kms_plane_multiple@tiling-none,Fail
kms_rmfb@close-fd,Fail
kms_universal_plane@universal-plane-functional,Fail
# Board Name: rk3399-gru-kevin
# Bug Report: https://lore.kernel.org/dri-devel/5cc34a8b-c1fa-4744-9031-2d33ecf41011@collabora.com/T/#u
# Bug Report: https://lore.kernel.org/linux-rockchip/3e267d0c-fde4-4533-b001-6ab7d7c03546@collabora.com/T/#u
# Failure Rate: 50
# IGT Version: 1.28-g0df7b9b97
# Linux Version: 6.9.0-rc7
panfrost/panfrost_submit@pan-unhandled-pagefault
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_bw@linear-tiling-1-displays-2560x1440p
# Board Name: rk3399-gru-kevin
# Bug Report: https://lore.kernel.org/linux-rockchip/3e267d0c-fde4-4533-b001-6ab7d7c03546@collabora.com/T/#u
# Failure Rate: 50
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_cursor_legacy@nonblocking-modeset-vs-cursor-atomic
# Board Name: rk3399-gru-kevin
# Bug Report: https://lore.kernel.org/linux-rockchip/3e267d0c-fde4-4533-b001-6ab7d7c03546@collabora.com/T/#u
# Failure Rate: 50
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_flip@dpms-vs-vblank-race-interruptible
# Board Name: rk3399-gru-kevin
# Bug Report: https://lore.kernel.org/linux-rockchip/3e267d0c-fde4-4533-b001-6ab7d7c03546@collabora.com/T/#u
# Failure Rate: 50
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_flip@flip-vs-absolute-wf_vblank-interruptible
# Board Name: rk3399-gru-kevin
# Bug Report: https://lore.kernel.org/linux-rockchip/3e267d0c-fde4-4533-b001-6ab7d7c03546@collabora.com/T/#u
# Failure Rate: 50
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_flip@flip-vs-wf_vblank-interruptible
# Board Name: rk3399-gru-kevin
# Bug Report: https://lore.kernel.org/linux-rockchip/3e267d0c-fde4-4533-b001-6ab7d7c03546@collabora.com/T/#u
# Failure Rate: 50
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_setmode@basic
# Board Name: rk3399-gru-kevin
# Bug Report: https://lore.kernel.org/linux-rockchip/3e267d0c-fde4-4533-b001-6ab7d7c03546@collabora.com/T/#u
# Failure Rate: 50
# IGT Version: 1.28-gf13702b8e
# Linux Version: 6.10.0-rc5
kms_bw@connected-linear-tiling-1-displays-2560x1440p
# Suspend to RAM seems to be broken on this machine
.*suspend.*
# Too unstable, machine ends up hanging after lots of Oopses
kms_cursor_legacy.*
# Skip driver specific tests
^amdgpu.*
^msm.*
nouveau_.*
^panfrost.*
^v3d.*
^vc4.*
^vmwgfx*
......@@ -15,9 +13,7 @@ nouveau_.*
# Skip intel specific tests
gem_.*
i915_.*
# Panfrost is not a KMS driver, so skip the KMS tests
kms_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
......@@ -187,4 +187,3 @@ kms_vblank@wait-forked,Fail
kms_vblank@wait-forked-busy,Fail
kms_vblank@wait-idle,Fail
perf@i915-ref-count,Fail
tools_test@tools_test,Fail
......@@ -18,6 +18,7 @@ nouveau_.*
gem_.*
i915_.*
xe_.*
tools_test.*
# Currently fails and causes coverage loss for other tests
# since core_getversion also fails.
......
......@@ -50,4 +50,3 @@ kms_writeback@writeback-fb-id-XRGB2101010,Fail
kms_writeback@writeback-invalid-parameters,Fail
kms_writeback@writeback-pixel-formats,Fail
perf@i915-ref-count,Fail
tools_test@tools_test,Fail
......@@ -218,3 +218,4 @@ nouveau_.*
gem_.*
i915_.*
xe_.*
tools_test.*
......@@ -426,6 +426,8 @@ static void drm_connector_cleanup_action(struct drm_device *dev,
*
* The connector structure should be allocated with drmm_kzalloc().
*
* The @drm_connector_funcs.destroy hook must be NULL.
*
* Returns:
* Zero on success, error code on failure.
*/
......@@ -474,6 +476,8 @@ EXPORT_SYMBOL(drmm_connector_init);
*
* The connector structure should be allocated with drmm_kzalloc().
*
* The @drm_connector_funcs.destroy hook must be NULL.
*
* Returns:
* Zero on success, error code on failure.
*/
......@@ -1043,11 +1047,6 @@ static const struct drm_prop_enum_list drm_scaling_mode_enum_list[] = {
{ DRM_MODE_SCALE_ASPECT, "Full aspect" },
};
static const struct drm_prop_enum_list drm_power_saving_policy_enum_list[] = {
{ __builtin_ffs(DRM_MODE_REQUIRE_COLOR_ACCURACY) - 1, "Require color accuracy" },
{ __builtin_ffs(DRM_MODE_REQUIRE_LOW_LATENCY) - 1, "Require low latency" },
};
static const struct drm_prop_enum_list drm_aspect_ratio_enum_list[] = {
{ DRM_MODE_PICTURE_ASPECT_NONE, "Automatic" },
{ DRM_MODE_PICTURE_ASPECT_4_3, "4:3" },
......@@ -1634,16 +1633,6 @@ EXPORT_SYMBOL(drm_hdmi_connector_get_output_format_name);
*
* Drivers can set up these properties by calling
* drm_mode_create_tv_margin_properties().
* power saving policy:
* This property is used to set the power saving policy for the connector.
* This property is populated with a bitmask of optional requirements set
* by the drm master for the drm driver to respect:
* - "Require color accuracy": Disable power saving features that will
* affect color fidelity.
* For example: Hardware assisted backlight modulation.
* - "Require low latency": Disable power saving features that will
* affect latency.
* For example: Panel self refresh (PSR)
*/
int drm_connector_create_standard_properties(struct drm_device *dev)
......@@ -2146,39 +2135,6 @@ int drm_mode_create_scaling_mode_property(struct drm_device *dev)
}
EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
/**
* drm_mode_create_power_saving_policy_property - create power saving policy property
* @dev: DRM device
* @supported_policies: bitmask of supported power saving policies
*
* Called by a driver the first time it's needed, must be attached to desired
* connectors.
*
* Returns: %0
*/
int drm_mode_create_power_saving_policy_property(struct drm_device *dev,
uint64_t supported_policies)
{
struct drm_property *power_saving;
if (dev->mode_config.power_saving_policy)
return 0;
WARN_ON((supported_policies & DRM_MODE_POWER_SAVING_POLICY_ALL) == 0);
power_saving =
drm_property_create_bitmask(dev, 0, "power saving policy",
drm_power_saving_policy_enum_list,
ARRAY_SIZE(drm_power_saving_policy_enum_list),
supported_policies);
if (!power_saving)
return -ENOMEM;
dev->mode_config.power_saving_policy = power_saving;
return 0;
}
EXPORT_SYMBOL(drm_mode_create_power_saving_policy_property);
/**
* DOC: Variable refresh properties
*
......
......@@ -12,6 +12,7 @@ mgag200-y := \
mgag200_g200se.o \
mgag200_g200wb.o \
mgag200_mode.o \
mgag200_vga_bmc.o \
mgag200_vga.o
obj-$(CONFIG_DRM_MGAG200) += mgag200.o
......@@ -9,11 +9,6 @@
#include "mgag200_drv.h"
static struct mgag200_bmc_connector *to_mgag200_bmc_connector(struct drm_connector *connector)
{
return container_of(connector, struct mgag200_bmc_connector, base);
}
void mgag200_bmc_stop_scanout(struct mga_device *mdev)
{
u8 tmp;
......@@ -102,100 +97,3 @@ void mgag200_bmc_start_scanout(struct mga_device *mdev)
tmp &= ~0x10;
WREG_DAC(MGA1064_GEN_IO_DATA, tmp);
}
static const struct drm_encoder_funcs mgag200_bmc_encoder_funcs = {
.destroy = drm_encoder_cleanup,
};
static int mgag200_bmc_connector_helper_detect_ctx(struct drm_connector *connector,
struct drm_modeset_acquire_ctx *ctx,
bool force)
{
struct mgag200_bmc_connector *bmc_connector = to_mgag200_bmc_connector(connector);
struct drm_connector *physical_connector = bmc_connector->physical_connector;
/*
* Most user-space compositors cannot handle more than one connected
* connector per CRTC. Hence, we only mark the BMC as connected if the
* physical connector is disconnected. If the physical connector's status
* is connected or unknown, the BMC remains disconnected. This has no
* effect on the output of the BMC.
*
* FIXME: Remove this logic once user-space compositors can handle more
* than one connector per CRTC. The BMC should always be connected.
*/
if (physical_connector && physical_connector->status == connector_status_disconnected)
return connector_status_connected;
return connector_status_disconnected;
}
static int mgag200_bmc_connector_helper_get_modes(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
struct mga_device *mdev = to_mga_device(dev);
const struct mgag200_device_info *minfo = mdev->info;
return drm_add_modes_noedid(connector, minfo->max_hdisplay, minfo->max_vdisplay);
}
static const struct drm_connector_helper_funcs mgag200_bmc_connector_helper_funcs = {
.get_modes = mgag200_bmc_connector_helper_get_modes,
.detect_ctx = mgag200_bmc_connector_helper_detect_ctx,
};
static const struct drm_connector_funcs mgag200_bmc_connector_funcs = {
.reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
};
static int mgag200_bmc_connector_init(struct drm_device *dev,
struct mgag200_bmc_connector *bmc_connector,
struct drm_connector *physical_connector)
{
struct drm_connector *connector = &bmc_connector->base;
int ret;
ret = drm_connector_init(dev, connector, &mgag200_bmc_connector_funcs,
DRM_MODE_CONNECTOR_VIRTUAL);
if (ret)
return ret;
drm_connector_helper_add(connector, &mgag200_bmc_connector_helper_funcs);
bmc_connector->physical_connector = physical_connector;
return 0;
}
int mgag200_bmc_output_init(struct mga_device *mdev, struct drm_connector *physical_connector)
{
struct drm_device *dev = &mdev->base;
struct drm_crtc *crtc = &mdev->crtc;
struct drm_encoder *encoder;
struct mgag200_bmc_connector *bmc_connector;
struct drm_connector *connector;
int ret;
encoder = &mdev->output.bmc.encoder;
ret = drm_encoder_init(dev, encoder, &mgag200_bmc_encoder_funcs,
DRM_MODE_ENCODER_VIRTUAL, NULL);
if (ret)
return ret;
encoder->possible_crtcs = drm_crtc_mask(crtc);
bmc_connector = &mdev->output.bmc.bmc_connector;
ret = mgag200_bmc_connector_init(dev, bmc_connector, physical_connector);
if (ret)
return ret;
connector = &bmc_connector->base;
ret = drm_connector_attach_encoder(connector, encoder);
if (ret)
return ret;
return 0;
}
......@@ -188,11 +188,6 @@ static inline struct mgag200_crtc_state *to_mgag200_crtc_state(struct drm_crtc_s
return container_of(base, struct mgag200_crtc_state, base);
}
struct mgag200_bmc_connector {
struct drm_connector base;
struct drm_connector *physical_connector;
};
enum mga_type {
G200_PCI,
G200_AGP,
......@@ -283,10 +278,6 @@ struct mga_device {
struct drm_encoder encoder;
struct drm_connector connector;
} vga;
struct {
struct drm_encoder encoder;
struct mgag200_bmc_connector bmc_connector;
} bmc;
} output;
};
......@@ -437,12 +428,14 @@ void mgag200_enable_display(struct mga_device *mdev);
void mgag200_init_registers(struct mga_device *mdev);
int mgag200_mode_config_init(struct mga_device *mdev, resource_size_t vram_available);
/* mgag200_vga_bmc.c */
int mgag200_vga_bmc_output_init(struct mga_device *mdev);
/* mgag200_vga.c */
int mgag200_vga_output_init(struct mga_device *mdev);
/* mgag200_bmc.c */
void mgag200_bmc_stop_scanout(struct mga_device *mdev);
void mgag200_bmc_start_scanout(struct mga_device *mdev);
int mgag200_bmc_output_init(struct mga_device *mdev, struct drm_connector *physical_connector);
#endif /* __MGAG200_DRV_H__ */
......@@ -215,11 +215,7 @@ static int mgag200_g200eh_pipeline_init(struct mga_device *mdev)
drm_mode_crtc_set_gamma_size(crtc, MGAG200_LUT_SIZE);
drm_crtc_enable_color_mgmt(crtc, 0, false, MGAG200_LUT_SIZE);
ret = mgag200_vga_output_init(mdev);
if (ret)
return ret;
ret = mgag200_bmc_output_init(mdev, &mdev->output.vga.connector);
ret = mgag200_vga_bmc_output_init(mdev);
if (ret)
return ret;
......
......@@ -119,11 +119,7 @@ static int mgag200_g200eh3_pipeline_init(struct mga_device *mdev)
drm_mode_crtc_set_gamma_size(crtc, MGAG200_LUT_SIZE);
drm_crtc_enable_color_mgmt(crtc, 0, false, MGAG200_LUT_SIZE);
ret = mgag200_vga_output_init(mdev);
if (ret)
return ret;
ret = mgag200_bmc_output_init(mdev, &mdev->output.vga.connector);
ret = mgag200_vga_bmc_output_init(mdev);
if (ret)
return ret;
......
......@@ -207,9 +207,6 @@ static void mgag200_g200er_crtc_helper_atomic_enable(struct drm_crtc *crtc,
mgag200_enable_display(mdev);
if (mdev->info->sync_bmc)
mgag200_bmc_start_scanout(mdev);
drm_crtc_vblank_on(crtc);
}
......@@ -258,11 +255,7 @@ static int mgag200_g200er_pipeline_init(struct mga_device *mdev)
drm_mode_crtc_set_gamma_size(crtc, MGAG200_LUT_SIZE);
drm_crtc_enable_color_mgmt(crtc, 0, false, MGAG200_LUT_SIZE);
ret = mgag200_vga_output_init(mdev);
if (ret)
return ret;
ret = mgag200_bmc_output_init(mdev, &mdev->output.vga.connector);
ret = mgag200_vga_bmc_output_init(mdev);
if (ret)
return ret;
......
......@@ -208,9 +208,6 @@ static void mgag200_g200ev_crtc_helper_atomic_enable(struct drm_crtc *crtc,
mgag200_enable_display(mdev);
if (mdev->info->sync_bmc)
mgag200_bmc_start_scanout(mdev);
drm_crtc_vblank_on(crtc);
}
......@@ -259,11 +256,7 @@ static int mgag200_g200ev_pipeline_init(struct mga_device *mdev)
drm_mode_crtc_set_gamma_size(crtc, MGAG200_LUT_SIZE);
drm_crtc_enable_color_mgmt(crtc, 0, false, MGAG200_LUT_SIZE);
ret = mgag200_vga_output_init(mdev);
if (ret)
return ret;
ret = mgag200_bmc_output_init(mdev, &mdev->output.vga.connector);
ret = mgag200_vga_bmc_output_init(mdev);
if (ret)
return ret;
......
......@@ -128,11 +128,7 @@ static int mgag200_g200ew3_pipeline_init(struct mga_device *mdev)
drm_mode_crtc_set_gamma_size(crtc, MGAG200_LUT_SIZE);
drm_crtc_enable_color_mgmt(crtc, 0, false, MGAG200_LUT_SIZE);
ret = mgag200_vga_output_init(mdev);
if (ret)
return ret;
ret = mgag200_bmc_output_init(mdev, &mdev->output.vga.connector);
ret = mgag200_vga_bmc_output_init(mdev);
if (ret)
return ret;
......
......@@ -339,9 +339,6 @@ static void mgag200_g200se_crtc_helper_atomic_enable(struct drm_crtc *crtc,
mgag200_enable_display(mdev);
if (mdev->info->sync_bmc)
mgag200_bmc_start_scanout(mdev);
drm_crtc_vblank_on(crtc);
}
......@@ -390,11 +387,7 @@ static int mgag200_g200se_pipeline_init(struct mga_device *mdev)
drm_mode_crtc_set_gamma_size(crtc, MGAG200_LUT_SIZE);
drm_crtc_enable_color_mgmt(crtc, 0, false, MGAG200_LUT_SIZE);
ret = mgag200_vga_output_init(mdev);
if (ret)
return ret;
ret = mgag200_bmc_output_init(mdev, &mdev->output.vga.connector);
ret = mgag200_vga_bmc_output_init(mdev);
if (ret)
return ret;
......
......@@ -262,11 +262,7 @@ static int mgag200_g200wb_pipeline_init(struct mga_device *mdev)
drm_mode_crtc_set_gamma_size(crtc, MGAG200_LUT_SIZE);
drm_crtc_enable_color_mgmt(crtc, 0, false, MGAG200_LUT_SIZE);
ret = mgag200_vga_output_init(mdev);
if (ret)
return ret;
ret = mgag200_bmc_output_init(mdev, &mdev->output.vga.connector);
ret = mgag200_vga_bmc_output_init(mdev);
if (ret)
return ret;
......
......@@ -611,7 +611,6 @@ int mgag200_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomic_st
struct mga_device *mdev = to_mga_device(dev);
const struct mgag200_device_funcs *funcs = mdev->funcs;
struct drm_crtc_state *new_crtc_state = drm_atomic_get_new_crtc_state(new_state, crtc);
struct mgag200_crtc_state *new_mgag200_crtc_state = to_mgag200_crtc_state(new_crtc_state);
struct drm_property_blob *new_gamma_lut = new_crtc_state->gamma_lut;
int ret;
......@@ -622,8 +621,6 @@ int mgag200_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomic_st
if (ret)
return ret;
new_mgag200_crtc_state->set_vidrst = mdev->info->sync_bmc;
if (new_crtc_state->mode_changed) {
if (funcs->pixpllc_atomic_check) {
ret = funcs->pixpllc_atomic_check(crtc, new_state);
......@@ -696,9 +693,6 @@ void mgag200_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_
mgag200_enable_display(mdev);
if (mdev->info->sync_bmc)
mgag200_bmc_start_scanout(mdev);
drm_crtc_vblank_on(crtc);
}
......@@ -708,9 +702,6 @@ void mgag200_crtc_helper_atomic_disable(struct drm_crtc *crtc, struct drm_atomic
drm_crtc_vblank_off(crtc);
if (mdev->info->sync_bmc)
mgag200_bmc_stop_scanout(mdev);
mgag200_disable_display(mdev);
}
......
// SPDX-License-Identifier: GPL-2.0-only
#include <drm/drm_atomic_helper.h>
#include <drm/drm_edid.h>
#include <drm/drm_modeset_helper_vtables.h>
#include <drm/drm_probe_helper.h>
#include "mgag200_ddc.h"
#include "mgag200_drv.h"
static void mgag200_vga_bmc_encoder_atomic_disable(struct drm_encoder *encoder,
struct drm_atomic_state *state)
{
struct mga_device *mdev = to_mga_device(encoder->dev);
if (mdev->info->sync_bmc)
mgag200_bmc_stop_scanout(mdev);
}
static void mgag200_vga_bmc_encoder_atomic_enable(struct drm_encoder *encoder,
struct drm_atomic_state *state)
{
struct mga_device *mdev = to_mga_device(encoder->dev);
if (mdev->info->sync_bmc)
mgag200_bmc_start_scanout(mdev);
}
static int mgag200_vga_bmc_encoder_atomic_check(struct drm_encoder *encoder,
struct drm_crtc_state *new_crtc_state,
struct drm_connector_state *new_connector_state)
{
struct mga_device *mdev = to_mga_device(encoder->dev);
struct mgag200_crtc_state *new_mgag200_crtc_state = to_mgag200_crtc_state(new_crtc_state);
new_mgag200_crtc_state->set_vidrst = mdev->info->sync_bmc;
return 0;
}
static const struct drm_encoder_helper_funcs mgag200_dac_encoder_helper_funcs = {
.atomic_disable = mgag200_vga_bmc_encoder_atomic_disable,
.atomic_enable = mgag200_vga_bmc_encoder_atomic_enable,
.atomic_check = mgag200_vga_bmc_encoder_atomic_check,
};
static const struct drm_encoder_funcs mgag200_dac_encoder_funcs = {
.destroy = drm_encoder_cleanup
};
static int mgag200_vga_bmc_connector_helper_get_modes(struct drm_connector *connector)
{
struct mga_device *mdev = to_mga_device(connector->dev);
const struct mgag200_device_info *minfo = mdev->info;
int count;
count = drm_connector_helper_get_modes(connector);
if (!count) {
/*
* There's no EDID data without a connected monitor. Set BMC-
* compatible modes in this case. The XGA default resolution
* should work well for all BMCs.
*/
count = drm_add_modes_noedid(connector, minfo->max_hdisplay, minfo->max_vdisplay);
if (count)
drm_set_preferred_mode(connector, 1024, 768);
}
return count;
}
/*
* There's no monitor connected if the DDC did not return an EDID. Still
* return 'connected' as there's always a BMC. Incrementing the connector's
* epoch counter triggers an update of the related properties.
*/
static int mgag200_vga_bmc_connector_helper_detect_ctx(struct drm_connector *connector,
struct drm_modeset_acquire_ctx *ctx,
bool force)
{
enum drm_connector_status old_status, status;
if (connector->edid_blob_ptr)
old_status = connector_status_connected;
else
old_status = connector_status_disconnected;
status = drm_connector_helper_detect_from_ddc(connector, ctx, force);
if (status != old_status)
++connector->epoch_counter;
return connector_status_connected;
}
static const struct drm_connector_helper_funcs mgag200_vga_connector_helper_funcs = {
.get_modes = mgag200_vga_bmc_connector_helper_get_modes,
.detect_ctx = mgag200_vga_bmc_connector_helper_detect_ctx,
};
static const struct drm_connector_funcs mgag200_vga_connector_funcs = {
.reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state
};
int mgag200_vga_bmc_output_init(struct mga_device *mdev)
{
struct drm_device *dev = &mdev->base;
struct drm_crtc *crtc = &mdev->crtc;
struct drm_encoder *encoder;
struct drm_connector *connector;
struct i2c_adapter *ddc;
int ret;
encoder = &mdev->output.vga.encoder;
ret = drm_encoder_init(dev, encoder, &mgag200_dac_encoder_funcs,
DRM_MODE_ENCODER_DAC, NULL);
if (ret) {
drm_err(dev, "drm_encoder_init() failed: %d\n", ret);
return ret;
}
drm_encoder_helper_add(encoder, &mgag200_dac_encoder_helper_funcs);
encoder->possible_crtcs = drm_crtc_mask(crtc);
ddc = mgag200_ddc_create(mdev);
if (IS_ERR(ddc)) {
ret = PTR_ERR(ddc);
drm_err(dev, "failed to add DDC bus: %d\n", ret);
return ret;
}
connector = &mdev->output.vga.connector;
ret = drm_connector_init_with_ddc(dev, connector,
&mgag200_vga_connector_funcs,
DRM_MODE_CONNECTOR_VGA, ddc);
if (ret) {
drm_err(dev, "drm_connector_init_with_ddc() failed: %d\n", ret);
return ret;
}
drm_connector_helper_add(connector, &mgag200_vga_connector_helper_funcs);
connector->polled = DRM_CONNECTOR_POLL_CONNECT |
DRM_CONNECTOR_POLL_DISCONNECT;
ret = drm_connector_attach_encoder(connector, encoder);
if (ret) {
drm_err(dev, "drm_connector_attach_encoder() failed: %d\n", ret);
return ret;
}
return 0;
}
......@@ -242,8 +242,7 @@ static void omapdss_walk_device(struct device *dev, struct device_node *node,
of_node_put(n);
n = NULL;
while ((n = of_graph_get_next_endpoint(node, n)) != NULL) {
for_each_endpoint_of_node(node, n) {
struct device_node *pn = of_graph_get_remote_port_parent(n);
if (!pn)
......
......@@ -1948,7 +1948,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('C', 'S', 'W', 0x1104, &delay_200_500_e50, "MNB601LS1-4"),
EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d51, &delay_200_500_e200, "Unknown"),
EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d5b, &delay_200_500_e200, "Unknown"),
EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d5b, &delay_200_500_e200, "MB116AN01"),
EDP_PANEL_ENTRY('H', 'K', 'C', 0x2d5c, &delay_200_500_e200, "MB116AN01-2"),
EDP_PANEL_ENTRY('I', 'V', 'O', 0x048e, &delay_200_500_e200_d10, "M116NWR6 R5"),
......
......@@ -75,7 +75,7 @@ static void XRGB8888_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 *out_pixe
static void ARGB16161616_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 *out_pixel)
{
u16 *pixels = (u16 *)src_pixels;
__le16 *pixels = (__force __le16 *)src_pixels;
out_pixel->a = le16_to_cpu(pixels[3]);
out_pixel->r = le16_to_cpu(pixels[2]);
......@@ -85,7 +85,7 @@ static void ARGB16161616_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 *out_
static void XRGB16161616_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 *out_pixel)
{
u16 *pixels = (u16 *)src_pixels;
__le16 *pixels = (__force __le16 *)src_pixels;
out_pixel->a = (u16)0xffff;
out_pixel->r = le16_to_cpu(pixels[2]);
......@@ -95,7 +95,7 @@ static void XRGB16161616_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 *out_
static void RGB565_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 *out_pixel)
{
u16 *pixels = (u16 *)src_pixels;
__le16 *pixels = (__force __le16 *)src_pixels;
s64 fp_rb_ratio = drm_fixp_div(drm_int2fixp(65535), drm_int2fixp(31));
s64 fp_g_ratio = drm_fixp_div(drm_int2fixp(65535), drm_int2fixp(63));
......@@ -178,7 +178,7 @@ static void argb_u16_to_XRGB8888(u8 *dst_pixels, struct pixel_argb_u16 *in_pixel
static void argb_u16_to_ARGB16161616(u8 *dst_pixels, struct pixel_argb_u16 *in_pixel)
{
u16 *pixels = (u16 *)dst_pixels;
__le16 *pixels = (__force __le16 *)dst_pixels;
pixels[3] = cpu_to_le16(in_pixel->a);
pixels[2] = cpu_to_le16(in_pixel->r);
......@@ -188,9 +188,9 @@ static void argb_u16_to_ARGB16161616(u8 *dst_pixels, struct pixel_argb_u16 *in_p
static void argb_u16_to_XRGB16161616(u8 *dst_pixels, struct pixel_argb_u16 *in_pixel)
{
u16 *pixels = (u16 *)dst_pixels;
__le16 *pixels = (__force __le16 *)dst_pixels;
pixels[3] = 0xffff;
pixels[3] = cpu_to_le16(0xffff);
pixels[2] = cpu_to_le16(in_pixel->r);
pixels[1] = cpu_to_le16(in_pixel->g);
pixels[0] = cpu_to_le16(in_pixel->b);
......@@ -198,7 +198,7 @@ static void argb_u16_to_XRGB16161616(u8 *dst_pixels, struct pixel_argb_u16 *in_p
static void argb_u16_to_RGB565(u8 *dst_pixels, struct pixel_argb_u16 *in_pixel)
{
u16 *pixels = (u16 *)dst_pixels;
__le16 *pixels = (__force __le16 *)dst_pixels;
s64 fp_rb_ratio = drm_fixp_div(drm_int2fixp(65535), drm_int2fixp(31));
s64 fp_g_ratio = drm_fixp_div(drm_int2fixp(65535), drm_int2fixp(63));
......
......@@ -2267,8 +2267,6 @@ int drm_mode_create_dp_colorspace_property(struct drm_connector *connector,
u32 supported_colorspaces);
int drm_mode_create_content_type_property(struct drm_device *dev);
int drm_mode_create_suggested_offset_properties(struct drm_device *dev);
int drm_mode_create_power_saving_policy_property(struct drm_device *dev,
uint64_t supported_policies);
int drm_connector_set_path_property(struct drm_connector *connector,
const char *path);
......
......@@ -969,11 +969,6 @@ struct drm_mode_config {
*/
struct drm_atomic_state *suspend_state;
/**
* @power_saving_policy: bitmask for power saving policy requests.
*/
struct drm_property *power_saving_policy;
const struct drm_mode_config_helper_funcs *helper_private;
};
......
......@@ -152,13 +152,6 @@ extern "C" {
#define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */
#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */
/* power saving policy options */
#define DRM_MODE_REQUIRE_COLOR_ACCURACY BIT(0) /* Compositor requires color accuracy */
#define DRM_MODE_REQUIRE_LOW_LATENCY BIT(1) /* Compositor requires low latency */
#define DRM_MODE_POWER_SAVING_POLICY_ALL (DRM_MODE_REQUIRE_COLOR_ACCURACY |\
DRM_MODE_REQUIRE_LOW_LATENCY)
/* Dithering mode options */
#define DRM_MODE_DITHERING_OFF 0
#define DRM_MODE_DITHERING_ON 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment