Commit f67fb980 authored by Thomas Zimmermann's avatar Thomas Zimmermann
Browse files

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: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250706162816.211552-3-tzimmermann@suse.de
parent 26ef96ee
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.

ast-y := \
	ast_2600.o \
	ast_cursor.o \
	ast_ddc.o \
	ast_dp501.o \
+41 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: MIT
/*
 * Copyright 2012 Red Hat Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sub license, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 */
/*
 * Authors: Dave Airlie <airlied@redhat.com>
 */

#include "ast_drv.h"

/*
 * POST
 */

int ast_2600_post(struct ast_device *ast)
{
	if (ast->tx_chip == AST_TX_ASTDP)
		return ast_dp_launch(ast);

	return 0;
}
+3 −0
Original line number Diff line number Diff line
@@ -417,6 +417,9 @@ struct ast_crtc_state {

int ast_mm_init(struct ast_device *ast);

/* ast_2600.c */
int ast_2600_post(struct ast_device *ast);

/* ast post */
int ast_post_gpu(struct ast_device *ast);
u32 ast_mindwm(struct ast_device *ast, u32 r);
+3 −5
Original line number Diff line number Diff line
@@ -348,11 +348,9 @@ int ast_post_gpu(struct ast_device *ast)
	ast_set_def_ext_reg(ast);

	if (AST_GEN(ast) >= 7) {
		if (ast->tx_chip == AST_TX_ASTDP) {
			ret = ast_dp_launch(ast);
		ret = ast_2600_post(ast);
		if (ret)
			return ret;
		}
	} else if (AST_GEN(ast) >= 6) {
		if (ast->config_mode == ast_use_p2a) {
			ast_post_chip_2500(ast);