Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/ast: Move Gen7+ POST code to separate source file

Move POST code for Gen7+ to separate source file and hide it in
ast_2600_post(). There's not much going on here except for enabling
the DP transmitter chip.

v2:
- simplify logic (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250706162816.211552-3-tzimmermann@suse.de

+48 -5
+1
drivers/gpu/drm/ast/Makefile
··· 4 4 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. 5 5 6 6 ast-y := \ 7 + ast_2600.o \ 7 8 ast_cursor.o \ 8 9 ast_ddc.o \ 9 10 ast_dp501.o \
+41
drivers/gpu/drm/ast/ast_2600.c
··· 1 + // SPDX-License-Identifier: MIT 2 + /* 3 + * Copyright 2012 Red Hat Inc. 4 + * 5 + * Permission is hereby granted, free of charge, to any person obtaining a 6 + * copy of this software and associated documentation files (the 7 + * "Software"), to deal in the Software without restriction, including 8 + * without limitation the rights to use, copy, modify, merge, publish, 9 + * distribute, sub license, and/or sell copies of the Software, and to 10 + * permit persons to whom the Software is furnished to do so, subject to 11 + * the following conditions: 12 + * 13 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 16 + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, 17 + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 18 + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 19 + * USE OR OTHER DEALINGS IN THE SOFTWARE. 20 + * 21 + * The above copyright notice and this permission notice (including the 22 + * next paragraph) shall be included in all copies or substantial portions 23 + * of the Software. 24 + */ 25 + /* 26 + * Authors: Dave Airlie <airlied@redhat.com> 27 + */ 28 + 29 + #include "ast_drv.h" 30 + 31 + /* 32 + * POST 33 + */ 34 + 35 + int ast_2600_post(struct ast_device *ast) 36 + { 37 + if (ast->tx_chip == AST_TX_ASTDP) 38 + return ast_dp_launch(ast); 39 + 40 + return 0; 41 + }
+3
drivers/gpu/drm/ast/ast_drv.h
··· 417 417 418 418 int ast_mm_init(struct ast_device *ast); 419 419 420 + /* ast_2600.c */ 421 + int ast_2600_post(struct ast_device *ast); 422 + 420 423 /* ast post */ 421 424 int ast_post_gpu(struct ast_device *ast); 422 425 u32 ast_mindwm(struct ast_device *ast, u32 r);
+3 -5
drivers/gpu/drm/ast/ast_post.c
··· 348 348 ast_set_def_ext_reg(ast); 349 349 350 350 if (AST_GEN(ast) >= 7) { 351 - if (ast->tx_chip == AST_TX_ASTDP) { 352 - ret = ast_dp_launch(ast); 353 - if (ret) 354 - return ret; 355 - } 351 + ret = ast_2600_post(ast); 352 + if (ret) 353 + return ret; 356 354 } else if (AST_GEN(ast) >= 6) { 357 355 if (ast->config_mode == ast_use_p2a) { 358 356 ast_post_chip_2500(ast);