Skip to content

Commit

Permalink
Merge tag 'drm-misc-next-2024-08-16' of https://gitlab.freedesktop.or…
Browse files Browse the repository at this point in the history
…g/drm/misc/kernel into drm-next

drm-misc-next for v6.12:

Core Changes:

ci:
- Update dependencies

docs:
- Cleanups

edid:
- Improve debug logging
- Clean up interface

fbdev emulation:
- Remove old fbdev hooks
- Update documentation

panic:
- Cleanups

Driver Changes:

amdgpu:
- Remove usage of old fbdev hooks
- Use backlight constants

ast:
- Fix timeout loop for DP link training

hisilicon:
- hibmc: Cleanups

mipi-dsi:
- Improve error handling
- startek-kd070fhfid015: Use new error handling

nouveau:
- Remove usage of old fbdev hooks

panel:
- Use backlight constants

radeon:
- Use backlight constants

rockchip:
- Improve DP sink-capability reporting
- Cleanups
- dw_hdmi: Support 4k@60Hz; Cleanups
- vop: Support RGB display on Rockchip RK3066; Support 4096px width

tilcdc:
- Use backlight constants

Signed-off-by: Daniel Vetter <[email protected]>
From: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
danvet committed Aug 22, 2024
2 parents a809b92 + 8befe8f commit 11df68c
Show file tree
Hide file tree
Showing 55 changed files with 471 additions and 416 deletions.
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,6 @@ extern const int amdgpu_max_kms_ioctl;

int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags);
void amdgpu_driver_unload_kms(struct drm_device *dev);
void amdgpu_driver_lastclose_kms(struct drm_device *dev);
int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv);
void amdgpu_driver_postclose_kms(struct drm_device *dev,
struct drm_file *file_priv);
Expand Down
2 changes: 0 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2953,7 +2953,6 @@ static const struct drm_driver amdgpu_kms_driver = {
DRIVER_SYNCOBJ_TIMELINE,
.open = amdgpu_driver_open_kms,
.postclose = amdgpu_driver_postclose_kms,
.lastclose = amdgpu_driver_lastclose_kms,
.ioctls = amdgpu_ioctls_kms,
.num_ioctls = ARRAY_SIZE(amdgpu_ioctls_kms),
.dumb_create = amdgpu_mode_dumb_create,
Expand All @@ -2980,7 +2979,6 @@ const struct drm_driver amdgpu_partition_driver = {
DRIVER_SYNCOBJ_TIMELINE,
.open = amdgpu_driver_open_kms,
.postclose = amdgpu_driver_postclose_kms,
.lastclose = amdgpu_driver_lastclose_kms,
.ioctls = amdgpu_ioctls_kms,
.num_ioctls = ARRAY_SIZE(amdgpu_ioctls_kms),
.dumb_create = amdgpu_mode_dumb_create,
Expand Down
17 changes: 0 additions & 17 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,23 +1269,6 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
return 0;
}


/*
* Outdated mess for old drm with Xorg being in charge (void function now).
*/
/**
* amdgpu_driver_lastclose_kms - drm callback for last close
*
* @dev: drm dev pointer
*
* Switch vga_switcheroo state after last close (all asics).
*/
void amdgpu_driver_lastclose_kms(struct drm_device *dev)
{
drm_fb_helper_lastclose(dev);
vga_switcheroo_process_delayed_switch();
}

/**
* amdgpu_driver_open_kms - drm callback for open
*
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void amdgpu_atombios_encoder_init_backlight(struct amdgpu_encoder *amdgpu_encode
dig->bl_dev = bd;

bd->props.brightness = amdgpu_atombios_encoder_get_backlight_brightness(bd);
bd->props.power = FB_BLANK_UNBLANK;
bd->props.power = BACKLIGHT_POWER_ON;
backlight_update_status(bd);

DRM_INFO("amdgpu atom DIG backlight initialized\n");
Expand Down
15 changes: 8 additions & 7 deletions drivers/gpu/drm/ast/ast_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,19 @@ void ast_dp_power_on_off(struct drm_device *dev, bool on)
void ast_dp_link_training(struct ast_device *ast)
{
struct drm_device *dev = &ast->base;
unsigned int i = 10;
int i;

while (i--) {
u8 vgacrdc = ast_get_index_reg(ast, AST_IO_VGACRI, 0xdc);
for (i = 0; i < 10; i++) {
u8 vgacrdc;

if (vgacrdc & AST_IO_VGACRDC_LINK_SUCCESS)
break;
if (i)
msleep(100);

vgacrdc = ast_get_index_reg(ast, AST_IO_VGACRI, 0xdc);
if (vgacrdc & AST_IO_VGACRDC_LINK_SUCCESS)
return;
}
if (!i)
drm_err(dev, "Link training failed\n");
drm_err(dev, "Link training failed\n");
}

void ast_dp_set_on_off(struct drm_device *dev, bool on)
Expand Down
8 changes: 8 additions & 0 deletions drivers/gpu/drm/ci/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ debian/x86_64_test-vk:
rules:
- when: never

debian/arm64_test-vk:
rules:
- when: never

debian/arm64_test-gl:
rules:
- when: never

fedora/x86_64_build:
rules:
- when: never
Expand Down
22 changes: 12 additions & 10 deletions drivers/gpu/drm/ci/gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
variables:
DRM_CI_PROJECT_PATH: &drm-ci-project-path mesa/mesa
DRM_CI_COMMIT_SHA: &drm-ci-commit-sha e2b9c5a9e3e4f9b532067af8022eaef8d6fc6c00
DRM_CI_COMMIT_SHA: &drm-ci-commit-sha d9849ac46623797a9f56fb9d46dc52460ac477de

UPSTREAM_REPO: https://gitlab.freedesktop.org/drm/kernel.git
TARGET_BRANCH: drm-next

IGT_VERSION: f13702b8e4e847c56da3ef6f0969065d686049c5

DEQP_RUNNER_GIT_URL: https://gitlab.freedesktop.org/anholt/deqp-runner.git
DEQP_RUNNER_GIT_URL: https://gitlab.freedesktop.org/mesa/deqp-runner.git
DEQP_RUNNER_GIT_TAG: v0.15.0

FDO_UPSTREAM_REPO: helen.fornazier/linux # The repo where the git-archive daily runs
Expand Down Expand Up @@ -85,22 +85,24 @@ include:
- project: *drm-ci-project-path
ref: *drm-ci-commit-sha
file:
- '/.gitlab-ci/container/gitlab-ci.yml'
- '/.gitlab-ci/farm-rules.yml'
- '/.gitlab-ci/lava/lava-gitlab-ci.yml'
- '/.gitlab-ci/test-source-dep.yml'
- '/.gitlab-ci/container/gitlab-ci.yml'
- '/.gitlab-ci/test/gitlab-ci.yml'
- '/.gitlab-ci/lava/lava-gitlab-ci.yml'
- '/src/microsoft/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/zink/ci/gitlab-ci-inc.yml'
- '/src/amd/ci/gitlab-ci-inc.yml'
- '/src/freedreno/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/crocus/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/softpipe/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/llvmpipe/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/nouveau/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/softpipe/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml'
- '/src/gallium/drivers/zink/ci/gitlab-ci-inc.yml'
- '/src/gallium/frontends/lavapipe/ci/gitlab-ci-inc.yml'
- '/src/gallium/frontends/rusticl/ci/gitlab-ci.yml'
- '/src/intel/ci/gitlab-ci-inc.yml'
- '/src/freedreno/ci/gitlab-ci-inc.yml'
- '/src/amd/ci/gitlab-ci-inc.yml'
- '/src/microsoft/ci/gitlab-ci-inc.yml'
- '/src/nouveau/ci/gitlab-ci-inc.yml'
- '/src/virtio/ci/gitlab-ci-inc.yml'
- drivers/gpu/drm/ci/image-tags.yml
- drivers/gpu/drm/ci/container.yml
Expand Down
8 changes: 4 additions & 4 deletions drivers/gpu/drm/ci/image-tags.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
variables:
CONTAINER_TAG: "2024-05-09-mesa-uprev"
CONTAINER_TAG: "2024-08-07-mesa-uprev"
DEBIAN_X86_64_BUILD_BASE_IMAGE: "debian/x86_64_build-base"
DEBIAN_BASE_TAG: "${CONTAINER_TAG}"

DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
DEBIAN_BUILD_TAG: "2024-06-10-vkms"
DEBIAN_BUILD_TAG: "${CONTAINER_TAG}"

KERNEL_ROOTFS_TAG: "2023-10-06-amd"
KERNEL_ROOTFS_TAG: "${CONTAINER_TAG}"

DEBIAN_X86_64_TEST_BASE_IMAGE: "debian/x86_64_test-base"
DEBIAN_X86_64_TEST_IMAGE_GL_PATH: "debian/x86_64_test-gl"
DEBIAN_X86_64_TEST_GL_TAG: "${CONTAINER_TAG}"
DEBIAN_TEST_GL_TAG: "${CONTAINER_TAG}"

ALPINE_X86_64_LAVA_SSH_TAG: "${CONTAINER_TAG}"
1 change: 1 addition & 0 deletions drivers/gpu/drm/ci/lava-submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ PYTHONPATH=artifacts/ artifacts/lava/lava_job_submitter.py \
--first-stage-init artifacts/ci-common/init-stage1.sh \
--ci-project-dir "${CI_PROJECT_DIR}" \
--device-type "${DEVICE_TYPE}" \
--farm "${FARM}" \
--dtb-filename "${DTB}" \
--jwt-file "${S3_JWT_FILE}" \
--kernel-image-name "${KERNEL_IMAGE_NAME}" \
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/ci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
.baremetal-igt-arm64:
extends:
- .baremetal-test-arm64
- .use-debian/arm64_test
- .use-debian/baremetal_arm64_test
- .test-rules
variables:
FDO_CI_CONCURRENT: 10
Expand All @@ -79,7 +79,7 @@
BM_CMDLINE: "ip=dhcp console=ttyMSM0,115200n8 $BM_KERNEL_EXTRA_ARGS root=/dev/nfs rw nfsrootdebug nfsroot=,tcp,nfsvers=4.2 init=/init $BM_KERNELARGS"
FARM: google
needs:
- debian/arm64_test
- debian/baremetal_arm64_test
- job: testing:arm64
artifacts: false
- igt:arm64
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ci/xfails/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ requests==2.31.0
requests-toolbelt==1.0.0
ruamel.yaml==0.17.32
ruamel.yaml.clib==0.2.7
setuptools==68.0.0
setuptools==70.0.0
tenacity==8.2.3
urllib3==2.0.7
wheel==0.41.1
4 changes: 4 additions & 0 deletions drivers/gpu/drm/drm_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -2342,7 +2342,9 @@ EXPORT_SYMBOL(drm_mode_create_aspect_ratio_property);
*
* Default:
* The behavior is driver-specific.
*
* BT2020_RGB:
*
* BT2020_YCC:
* User space configures the pixel operation properties to produce
* RGB content with Rec. ITU-R BT.2020 colorimetry, Rec.
Expand All @@ -2366,6 +2368,7 @@ EXPORT_SYMBOL(drm_mode_create_aspect_ratio_property);
* range.
* The variants BT2020_RGB and BT2020_YCC are equivalent and the
* driver chooses between RGB and YCbCr on its own.
*
* SMPTE_170M_YCC:
* BT709_YCC:
* XVYCC_601:
Expand All @@ -2378,6 +2381,7 @@ EXPORT_SYMBOL(drm_mode_create_aspect_ratio_property);
* DCI-P3_RGB_Theater:
* RGB_WIDE_FIXED:
* RGB_WIDE_FLOAT:
*
* BT601_YCC:
* The behavior is undefined.
*
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/drm_crtc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,12 @@ drm_edid_load_firmware(struct drm_connector *connector)
/* drm_panic.c */
#ifdef CONFIG_DRM_PANIC
bool drm_panic_is_enabled(struct drm_device *dev);
void drm_panic_register(struct drm_device *dev);
void drm_panic_unregister(struct drm_device *dev);
#else
static inline bool drm_panic_is_enabled(struct drm_device *dev) { return false; }
static inline void drm_panic_register(struct drm_device *dev) {}
static inline void drm_panic_unregister(struct drm_device *dev) {}
#endif

#endif /* __DRM_CRTC_INTERNAL_H__ */
3 changes: 0 additions & 3 deletions drivers/gpu/drm/drm_displayid.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ validate_displayid(const u8 *displayid, int length, int idx)
if (IS_ERR(base))
return base;

DRM_DEBUG_KMS("base revision 0x%x, length %d, %d %d\n",
base->rev, base->bytes, base->prod_id, base->ext_count);

/* +1 for DispID checksum */
dispid_length = sizeof(*base) + base->bytes + 1;
if (dispid_length > length - idx)
Expand Down
22 changes: 9 additions & 13 deletions drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -1966,22 +1966,14 @@ static void edid_block_dump(const char *level, const void *block, int block_num)
block, EDID_LENGTH, false);
}

/**
* drm_edid_block_valid - Sanity check the EDID block (base or extension)
* @_block: pointer to raw EDID block
* @block_num: type of block to validate (0 for base, extension otherwise)
* @print_bad_edid: if true, dump bad EDID blocks to the console
* @edid_corrupt: if true, the header or checksum is invalid
*
/*
* Validate a base or extension EDID block and optionally dump bad blocks to
* the console.
*
* Return: True if the block is valid, false otherwise.
*/
bool drm_edid_block_valid(u8 *_block, int block_num, bool print_bad_edid,
bool *edid_corrupt)
static bool drm_edid_block_valid(void *_block, int block_num, bool print_bad_edid,
bool *edid_corrupt)
{
struct edid *block = (struct edid *)_block;
struct edid *block = _block;
enum edid_block_status status;
bool is_base_block = block_num == 0;
bool valid;
Expand Down Expand Up @@ -2024,7 +2016,6 @@ bool drm_edid_block_valid(u8 *_block, int block_num, bool print_bad_edid,

return valid;
}
EXPORT_SYMBOL(drm_edid_block_valid);

/**
* drm_edid_is_valid - sanity check EDID data
Expand Down Expand Up @@ -6629,6 +6620,11 @@ static void update_displayid_info(struct drm_connector *connector,

displayid_iter_edid_begin(drm_edid, &iter);
displayid_iter_for_each(block, &iter) {
drm_dbg_kms(connector->dev,
"[CONNECTOR:%d:%s] DisplayID extension version 0x%02x, primary use 0x%02x\n",
connector->base.id, connector->name,
displayid_version(&iter),
displayid_primary_use(&iter));
if (displayid_version(&iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
(displayid_primary_use(&iter) == PRIMARY_USE_HEAD_MOUNTED_VR ||
displayid_primary_use(&iter) == PRIMARY_USE_HEAD_MOUNTED_AR))
Expand Down
37 changes: 7 additions & 30 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,6 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
* interfaces. Drivers that use one of the shared memory managers, TTM, SHMEM,
* DMA, should instead use the corresponding fbdev emulation.
*
* Existing fbdev implementations should restore the fbdev console by using
* drm_fb_helper_lastclose() as their &drm_driver.lastclose callback.
* They should also notify the fb helper code from updates to the output
* configuration by using drm_fb_helper_output_poll_changed() as their
* &drm_mode_config_funcs.output_poll_changed callback. New implementations
* of fbdev should be build on top of struct &drm_client_funcs, which handles
* this automatically. Setting the old callbacks should be avoided.
*
* For suspend/resume consider using drm_mode_config_helper_suspend() and
* drm_mode_config_helper_resume() which takes care of fbdev as well.
*
Expand Down Expand Up @@ -260,12 +252,12 @@ __drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper,
* drm_fb_helper_restore_fbdev_mode_unlocked - restore fbdev configuration
* @fb_helper: driver-allocated fbdev helper, can be NULL
*
* This should be called from driver's drm &drm_driver.lastclose callback
* when implementing an fbcon on top of kms using this helper. This ensures that
* the user isn't greeted with a black screen when e.g. X dies.
* This helper should be called from fbdev emulation's &drm_client_funcs.restore
* callback. It ensures that the user isn't greeted with a black screen when the
* userspace compositor releases the display device.
*
* RETURNS:
* Zero if everything went ok, negative error code otherwise.
* Returns:
* 0 on success, or a negative errno code otherwise.
*/
int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
{
Expand Down Expand Up @@ -2003,26 +1995,11 @@ EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
* drm_fb_helper_lastclose - DRM driver lastclose helper for fbdev emulation
* @dev: DRM device
*
* This function can be used as the &drm_driver->lastclose callback for drivers
* that only need to call drm_fb_helper_restore_fbdev_mode_unlocked().
* This function is obsolete. Call drm_fb_helper_restore_fbdev_mode_unlocked()
* instead.
*/
void drm_fb_helper_lastclose(struct drm_device *dev)
{
drm_fb_helper_restore_fbdev_mode_unlocked(dev->fb_helper);
}
EXPORT_SYMBOL(drm_fb_helper_lastclose);

/**
* drm_fb_helper_output_poll_changed - DRM mode config \.output_poll_changed
* helper for fbdev emulation
* @dev: DRM device
*
* This function can be used as the
* &drm_mode_config_funcs.output_poll_changed callback for drivers that only
* need to call drm_fbdev.hotplug_event().
*/
void drm_fb_helper_output_poll_changed(struct drm_device *dev)
{
drm_fb_helper_hotplug_event(dev->fb_helper);
}
EXPORT_SYMBOL(drm_fb_helper_output_poll_changed);
Loading

0 comments on commit 11df68c

Please sign in to comment.