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

viafb: Determine type of 2D engine and store it in chip_info

This will help us for the upcoming support for 2D acceleration using
the M1 engine.

[jc: fixed merge conflicts]
Signed-off-by: Harald Welte <HaraldWelte@viatech.com>

authored by

Harald Welte and committed by
Jonathan Corbet
107ea34d f1b99aa9

+23
+8
drivers/video/via/chip.h
··· 121 121 int i2c_port; 122 122 }; 123 123 124 + /* The type of 2D engine */ 125 + enum via_2d_engine { 126 + VIA_2D_ENG_H2, 127 + VIA_2D_ENG_H5, 128 + VIA_2D_ENG_M1, 129 + }; 130 + 124 131 struct chip_information { 125 132 int gfx_chip_name; 126 133 int gfx_chip_revision; 134 + enum via_2d_engine twod_engine; 127 135 struct tmds_chip_information tmds_chip_info; 128 136 struct lvds_chip_information lvds_chip_info; 129 137 struct lvds_chip_information lvds_chip_info2;
+15
drivers/video/via/hw.c
··· 2016 2016 CX700_REVISION_700; 2017 2017 } 2018 2018 } 2019 + 2020 + /* Determine which 2D engine we have */ 2021 + switch (viaparinfo->chip_info->gfx_chip_name) { 2022 + case UNICHROME_VX800: 2023 + case UNICHROME_VX855: 2024 + viaparinfo->chip_info->twod_engine = VIA_2D_ENG_M1; 2025 + break; 2026 + case UNICHROME_K8M890: 2027 + case UNICHROME_P4M900: 2028 + viaparinfo->chip_info->twod_engine = VIA_2D_ENG_H5; 2029 + break; 2030 + default: 2031 + viaparinfo->chip_info->twod_engine = VIA_2D_ENG_H2; 2032 + break; 2033 + } 2019 2034 } 2020 2035 2021 2036 static void init_tmds_chip_info(void)