diff options
author | Dave Airlie <airlied@redhat.com> | 2024-04-22 12:29:17 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2024-04-22 12:29:18 +1000 |
commit | 2871ec40994912ce4f2e2d5072a428eb84c77d3c (patch) | |
tree | d6a0afd91d5433cc4e674411fff0a0ca95101cde /drivers/gpu/drm/ast/ast_mode.c | |
parent | 377b5b397d073c0aae36b833a5bcac0e6f349243 (diff) | |
parent | 069a6c0e94f99437652dbb7229a56233c7d39968 (diff) |
Merge tag 'drm-misc-next-2024-04-19' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
drm-misc-next for v6.10-rc1:
UAPI Changes:
- Add SIZE_HINTS property for cursor planes.
Cross-subsystem Changes:
Core Changes:
- Document the requirements and expectations of adding new
driver-specific properties.
- Assorted small fixes to ttm.
- More Kconfig fixes.
- Add struct drm_edid_product_id and helpers.
- Use drm device based logging in more drm functions.
- Fixes for drm-panic, and option to test it.
- Assorted small fixes and updates to edid.
- Add drm_crtc_vblank_crtc and use it in vkms, nouveau.
Driver Changes:
- Assorted small fixes and improvements to bridge/imx8mp-hdmi-tx, nouveau, ast, qaic, lima, vc4, bridge/anx7625, mipi-dsi.
- Add drm panic to simpledrm, mgag200, imx, ast.
- Use dev_err_probe in bridge/panel drivers.
- Add Innolux G121X1-L03, LG sw43408 panels.
- Use struct drm_edid in i915 bios parsing.
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/2dc1b7c6-1743-4ddd-ad42-36f700234fbe@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/ast/ast_mode.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_mode.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index bb9b66aba9ee..6695af70768f 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -43,6 +43,7 @@ #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_gem_shmem_helper.h> #include <drm/drm_managed.h> +#include <drm/drm_panic.h> #include <drm/drm_probe_helper.h> #include <drm/drm_simple_kms_helper.h> @@ -701,12 +702,29 @@ static void ast_primary_plane_helper_atomic_disable(struct drm_plane *plane, ast_set_index_reg_mask(ast, AST_IO_VGASRI, 0x1, 0xdf, 0x20); } +static int ast_primary_plane_helper_get_scanout_buffer(struct drm_plane *plane, + struct drm_scanout_buffer *sb) +{ + struct ast_plane *ast_plane = to_ast_plane(plane); + + if (plane->state && plane->state->fb && ast_plane->vaddr) { + sb->format = plane->state->fb->format; + sb->width = plane->state->fb->width; + sb->height = plane->state->fb->height; + sb->pitch[0] = plane->state->fb->pitches[0]; + iosys_map_set_vaddr_iomem(&sb->map[0], ast_plane->vaddr); + return 0; + } + return -ENODEV; +} + static const struct drm_plane_helper_funcs ast_primary_plane_helper_funcs = { DRM_GEM_SHADOW_PLANE_HELPER_FUNCS, .atomic_check = ast_primary_plane_helper_atomic_check, .atomic_update = ast_primary_plane_helper_atomic_update, .atomic_enable = ast_primary_plane_helper_atomic_enable, .atomic_disable = ast_primary_plane_helper_atomic_disable, + .get_scanout_buffer = ast_primary_plane_helper_get_scanout_buffer, }; static const struct drm_plane_funcs ast_primary_plane_funcs = { @@ -1360,7 +1378,7 @@ static const struct drm_connector_funcs ast_vga_connector_funcs = { static int ast_vga_connector_init(struct drm_device *dev, struct drm_connector *connector) { struct ast_device *ast = to_ast_device(dev); - struct ast_ddc *ddc; + struct i2c_adapter *ddc; int ret; ddc = ast_ddc_create(ast); @@ -1371,7 +1389,7 @@ static int ast_vga_connector_init(struct drm_device *dev, struct drm_connector * } ret = drm_connector_init_with_ddc(dev, connector, &ast_vga_connector_funcs, - DRM_MODE_CONNECTOR_VGA, &ddc->adapter); + DRM_MODE_CONNECTOR_VGA, ddc); if (ret) return ret; @@ -1429,7 +1447,7 @@ static const struct drm_connector_funcs ast_sil164_connector_funcs = { static int ast_sil164_connector_init(struct drm_device *dev, struct drm_connector *connector) { struct ast_device *ast = to_ast_device(dev); - struct ast_ddc *ddc; + struct i2c_adapter *ddc; int ret; ddc = ast_ddc_create(ast); @@ -1440,7 +1458,7 @@ static int ast_sil164_connector_init(struct drm_device *dev, struct drm_connecto } ret = drm_connector_init_with_ddc(dev, connector, &ast_sil164_connector_funcs, - DRM_MODE_CONNECTOR_DVII, &ddc->adapter); + DRM_MODE_CONNECTOR_DVII, ddc); if (ret) return ret; |