drm/amd/display: add SI support to AMD DC
Subsystems (3)
[PATCH 01/10] drm/amd/display: add asics info for SI parts [PATCH 02/10] drm/amd/display: dc/dce: add DCE6 support [PATCH 03/10] drm/amd/display: dc/core: add DCE6 support [PATCH 04/10] drm/amd/display: dc/bios: add support for DCE6 [PATCH 05/10] drm/amd/display: dc/gpio: add support for DCE6 [PATCH 06/10] drm/amd/display: dc/i2caux: add support for DCE6 [PATCH 07/10] drm/amd/display: dc/irq: add support for DCE6 [PATCH 08/10] drm/amd/display: amdgpu_dm: add SI support [PATCH 09/10] drm/amdgpu: enable DC support for SI parts [PATCH 10/10] drm/amd/display: enable SI support in the Kconfig
The series adds preliminar SI support as a Proof Of Concept, based on the idea that DCE6 is similar to DCE8, to be reviewed and refined
Android-x86 need/motivation lies in the following chain of dependencies:
Vulkan radv requires gbm gralloc prime_fd support,
gbm gralloc requires drm hwcomposer,
drm hwcomposer requires Atomic Display Framework,
Atomic Display Framework requires AMD DC, currently not supporting SI.
So the goals are:
1) to get Vulkan radv working on SI parts for android-x86.
2) to remove the gap in SI (GCN 1st gen) not having atomic support.
DCE6 specific code was implemented as a replica of existing DCE8 support and based on how DCE8 specific code was added on top of DCE10,11 support by adding dce60* sources, functions, macros for each existing in dce80*
CONFIG_DRM_AMD_DC_SI parameter has been added to control SI support in DC
During this first iteration of review, there are aspects to verify:
- dce60 code has been added mechanically, so there may be redundancies and space for refactoring part of the code
- dce60_resources was having too many building errors due to missing DCE6 macros in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- gfx6 may require some ad hoc initialization, skipped for the moment
- Hainan specific code requires review, as some documentation and code paths seem to point that famility may not have DCE6, please confirm
- video decoding blocks code have not been touched
- dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
- dc/dce/dce_dmcu.{c,h} may be missing some SI/DCE6 specifics
- dc/dce/dce_hwseq.h may be missing some SI/DCE6 specifics
- dc/dce/dce_link_encoder.h may be missing some SI/DCE6 specifics
- dc/dce/dce_stream_encoder.h may be missing some SI/DCE6 specifics
- dc/amdgpu_dm/* changes may be incomplete
- Any other omissis to be reviewed
- Feedback on best testing strategy required
Review from an expert of the DC impacted modules is recommended
SW Layer
/===============================================================\
| DC Display Timing Mode Asic | | Interface Service Service Manager Capability* | | | | Display Topology Display Link Adapter | | Path Manager Capability Service Service | | Service | |---------------------------------------------------------------| | GPIO* IRQ I2cAux HW BIOS | | Service** Manager* Sequencer* Parser* | | | | Connector Encoder Audio GPU Controller | | |
\===============================================================/
HW Layer
Legend:
*dce60 support was added cleanly with dce_6_0_{d,sh_mask}.h headers **dce60 support was added using dce_8_0_{d,sh_mask}.h headers
Android-x86 preliminary tests results:
[Boots with drm gralloc]
3DMark Slingshot
GFXbench OpenGLES benchmarks OK
V1 GPU benchmark (OpenGLES) OK
Regression in Google Chrome, Youtube (app does not show up) Regression in Olympus Rising, Chicken Invaders (app does not show up)
[Boots with drm hwcomposer + gbm gralloc]
Google Chrome, Youtube are OK
Vulkan radv HAL API becomes available with hwc+gbm gralloc V1 GPU benchmark (Vulkan API) OK
Sacha Willems examples OK
Some glitch/freeze in 3DMark Slingshot Extreeme and API overhead
Kind regards
Mauro Rossi
android-x86 team
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20181008022344.10247-1-issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/10 drm/amd/display: add asics info for SI parts
Asics info retrieved from si_id.h in https://github.com/GPUOpen-Tools/CodeXL
Tree path:./CodeXL/Components/ShaderAnalyzer/AMDTBackEnd/Include/Common/asic_reg/si_id.h
--- .../gpu/drm/amd/display/include/dal_asic_id.h | 40 +++++++++++++++++++ .../gpu/drm/amd/display/include/dal_types.h | 3 ++ 2 files changed, 43 insertions(+)
drivers/gpu/drm/amd/display/include/dal_asic_id.h +40 -0
@@ -30,6 +30,34 @@* ASIC internal revision ID */ +/* DCE60 (based on si_id.h in GPUOpen-Tools CodeXL) */ +#define SI_TAHITI_P_A0 0x01 +#define SI_TAHITI_P_B0 0x05 +#define SI_TAHITI_P_B1 0x06 +#define SI_PITCAIRN_PM_A0 0x14 +#define SI_PITCAIRN_PM_A1 0x15 +#define SI_CAPEVERDE_M_A0 0x28 +#define SI_CAPEVERDE_M_A1 0x29 +#define SI_OLAND_M_A0 0x3C +#define SI_HAINAN_V_A0 0x46 + +#define SI_UNKNOWN 0xFF + +#define ASIC_REV_IS_TAHITI_P (rev) \ + ((rev >= SI_TAHITI_P_A0) && (rev < SI_PITCAIRN_PM_A0)) + +#define ASIC_REV_IS_PITCAIRN_PM (rev) \ + ((rev >= SI_PITCAIRN_PM_A0) && (rev < SI_CAPEVERDE_M_A0)) + +#define ASIC_REV_IS_CAPEVERDE_M (rev) \ + ((rev >= SI_CAPEVERDE_M_A0) && (rev < SI_OLAND_M_A0)) + +#define ASIC_REV_IS_OLAND_M (rev) \ + ((rev >= SI_OLAND_M_A0) && (rev < SI_HAINAN_V_A0)) + +#define ASIC_REV_IS_HAINAN_V (rev) \ + ((rev >= SI_HAINAN_V_A0) && (rev < SI_UNKNOWN)) +/* DCE80 (based on ci_id.h in Perforce) */ #define CI_BONAIRE_M_A0 0x14#define CI_BONAIRE_M_A1 0x15
@@ -143,12 +171,24 @@/* * ASIC chip ID */ + +/* DCE60 */ +#define DEVICE_ID_SI_TAHITI_P_6780 0x6780 +#define DEVICE_ID_SI_PITCAIRN_PM_6800 0x6800 +#define DEVICE_ID_SI_PITCAIRN_PM_6808 0x6808 +#define DEVICE_ID_SI_CAPEVERDE_M_6820 0x6820 +#define DEVICE_ID_SI_CAPEVERDE_M_6828 0x6828 +#define DEVICE_ID_SI_OLAND_M_6600 0x6600 +#define DEVICE_ID_SI_OLAND_M_6608 0x6608 +#define DEVICE_ID_SI_HAINAN_V_6660 0x6660 +/* DCE80 */ #define DEVICE_ID_KALINDI_9834 0x9834#define DEVICE_ID_TEMASH_9839 0x9839#define DEVICE_ID_TEMASH_983D 0x983D/* Asic Family IDs for different asic family. */ +#define FAMILY_SI 110/* Southern Islands: Tahiti (P), Pitcairn (PM), Cape Verde (M), Oland (M), Hainan (V) */ #define FAMILY_CI 120/* Sea Islands: Hawaii (P), Bonaire (M) */ #define FAMILY_KV 125/* Fusion => Kaveri: Spectre, Spooky; Kabini: Kalindi */ #define FAMILY_VI 130/* Volcanic Islands: Iceland (V), Tonga (M) */
drivers/gpu/drm/amd/display/include/dal_types.h +3 -0
@@ -34,6 +34,9 @@ struct dc_bios;enum dce_version {DCE_VERSION_UNKNOWN = (-1 ), +DCE_VERSION_6_0 , +DCE_VERSION_6_1 , +DCE_VERSION_6_4 ,DCE_VERSION_8_0 ,DCE_VERSION_8_1 ,DCE_VERSION_8_3 ,
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/10 drm/amd/display: dc/dce: add DCE6 support
In reply to a message not in the archiveDCE6 targets are added replicating existing DCE8 implementation.
NOTE: dce_8_0_{d,sh_mask}.h headers used instead of dce_6_0_{d,sh_mask}.h only to build dce60_resource.c due to missing *_DCE60 macros/registers/masks
IMPORTANT: Coding of dce60_resource.c requires review to understand if dce_6_0_{d,sh_mask}.h should be updated with macros/registers/masks
--- drivers/gpu/drm/amd/display/dc/Makefile | 4 + .../drm/amd/display/dc/dce/dce_clock_source.c | 15 + drivers/gpu/drm/amd/display/dc/dce60/Makefile | 34 + .../amd/display/dc/dce60/dce60_hw_sequencer.c | 81 + .../amd/display/dc/dce60/dce60_hw_sequencer.h | 36 + .../drm/amd/display/dc/dce60/dce60_resource.c | 1348 +++++++++++++++++ .../drm/amd/display/dc/dce60/dce60_resource.h | 47 + .../display/dc/dce60/dce60_timing_generator.c | 242 +++ .../display/dc/dce60/dce60_timing_generator.h | 39 + .../include/asic_reg/dce/dce_6_0_sh_mask.h | 4 + 10 files changed, 1850 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/dce60/Makefile create mode 100644 drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c create mode 100644 drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.h create mode 100644 drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c create mode 100644 drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.h create mode 100644 drivers/gpu/drm/amd/display/dc/dce60/dce60_timing_generator.c create mode 100644 drivers/gpu/drm/amd/display/dc/dce60/dce60_timing_generator.h
drivers/gpu/drm/amd/display/dc/Makefile +4 -0
@@ -36,6 +36,10 @@ DC_LIBS += dce110 DC_LIBS += dce100 DC_LIBS += dce80 +ifdef CONFIG_DRM_AMD_DC_SI +DC_LIBS += dce60 +endif + AMD_DC = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/dc/,$(DC_LIBS))) include $(AMD_DC)
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c +15 -0
@@ -580,6 +580,11 @@ static uint32_t dce110_get_pix_clk_dividers( }switch (cs->ctx->dce_version) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : +case DCE_VERSION_6_1 : +case DCE_VERSION_6_4 : +#endif case DCE_VERSION_8_0 :case DCE_VERSION_8_1 :case DCE_VERSION_8_3 :
@@ -941,6 +946,11 @@ static bool dce110_program_pix_clk( bp_pc_params.signal_type = pix_clk_params->signal_type;switch (clock_source->ctx->dce_version) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : +case DCE_VERSION_6_1 : +case DCE_VERSION_6_4 : +#endif case DCE_VERSION_8_0 :case DCE_VERSION_8_1 :case DCE_VERSION_8_3 :
@@ -1296,6 +1306,11 @@ bool dce110_clk_src_construct( fw_info.external_clock_source_frequency_for_dp;switch (clk_src->base.ctx->dce_version) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : +case DCE_VERSION_6_1 : +case DCE_VERSION_6_4 : +#endif case DCE_VERSION_8_0 :case DCE_VERSION_8_1 :case DCE_VERSION_8_3 :
drivers/gpu/drm/amd/display/dc/dce60/Makefile new file +34 -0
@@ -0,0 +1,34 @@ +# +# Copyright 2017 Advanced Micro Devices, 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, sublicense, +# 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 above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# 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 NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. +# +# +# Makefile for the 'controller' sub-component of DAL. +# It provides the control and status of HW CRTC block. + +DCE60 = dce60_timing_generator.o dce60_hw_sequencer.o \ + dce60_resource.o + +AMD_DAL_DCE60 = $(addprefix $(AMDDALPATH)/dc/dce60/,$(DCE60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_DCE60) + + +
drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c new file +81 -0
81 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright 2012-15 Advanced Micro Devices, 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, sublicense, +* 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 above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 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 NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. +* +* Authors: AMD +* +*/ + +#ifndef __DC_HWSS_DCE60_H__ +#define __DC_HWSS_DCE60_H__ + +#include "core_types.h" + +struct dc ; + +void dce60_hw_sequencer_construct (struct dc *dc); + +#endif /* __DC_HWSS_DCE60_H__ */ +
drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.c new file +1348 -0
1,348 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce60/dce60_resource.h new file +47 -0
47 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce60/dce60_timing_generator.c new file +242 -0
242 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/dce60/dce60_timing_generator.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright 2012-15 Advanced Micro Devices, 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, sublicense, +* 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 above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 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 NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. +* +* Authors: AMD +* +*/ + +#ifndef __DC_TIMING_GENERATOR_DCE60_H__ +#define __DC_TIMING_GENERATOR_DCE60_H__ + +#include "timing_generator.h" +#include "../include/grph_object_id.h" + +/* DCE6.0 implementation inherits from DCE11.0 */ +void dce60_timing_generator_construct ( +struct dce110_timing_generator *tg, +struct dc_context *ctx, +uint32_t instance, +const struct dce110_timing_generator_offsets *offsets); + +#endif /* __DC_TIMING_GENERATOR_DCE60_H__ */
drivers/gpu/drm/amd/include/asic_reg/dce/dce_6_0_sh_mask.h +4 -0
@@ -2264,6 +2264,10 @@#define CRTC_START_LINE_CONTROL__CRTC_ADVANCED_START_LINE_POSITION__SHIFT 0x00000010#define CRTC_START_LINE_CONTROL__CRTC_INTERLACE_START_LINE_EARLY_MASK 0x00000100L#define CRTC_START_LINE_CONTROL__CRTC_INTERLACE_START_LINE_EARLY__SHIFT 0x00000008 +#define CRTC_START_LINE_CONTROL__CRTC_LEGACY_REQUESTOR_EN_MASK 0x100000 +#define CRTC_START_LINE_CONTROL__CRTC_LEGACY_REQUESTOR_EN__SHIFT 0x14 +#define CRTC_START_LINE_CONTROL__CRTC_PREFETCH_EN_MASK 0x10000000 +#define CRTC_START_LINE_CONTROL__CRTC_PREFETCH_EN__SHIFT 0x1c#define CRTC_START_LINE_CONTROL__CRTC_PROGRESSIVE_START_LINE_EARLY_MASK 0x00000001L#define CRTC_START_LINE_CONTROL__CRTC_PROGRESSIVE_START_LINE_EARLY__SHIFT 0x00000000#define CRTC_STATUS__CRTC_H_ACTIVE_DISP_MASK 0x00020000L
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/10 drm/amd/display: dc/core: add DCE6 support
In reply to a message not in the archiveDCE6 targets are added as branching of existing DCE8 implementation.
--- .../gpu/drm/amd/display/dc/core/dc_resource.c | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +29 -0
@@ -37,6 +37,9 @@#include "virtual/virtual_stream_encoder.h" #include "dpcd_defs.h" +#if defined(CONFIG_DRM_AMD_DC_SI ) +#include "dce60/dce60_resource.h" +#endif #include "dce80/dce80_resource.h" #include "dce100/dce100_resource.h" #include "dce110/dce110_resource.h"
@@ -53,6 +56,18 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)enum dce_version dc_version =DCE_VERSION_UNKNOWN ;switch (asic_id.chip_family) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case FAMILY_SI : +if (ASIC_REV_IS_TAHITI_P (asic_id.hw_internal_rev) || +ASIC_REV_IS_PITCAIRN_PM (asic_id.hw_internal_rev) || +ASIC_REV_IS_CAPEVERDE_M (asic_id.hw_internal_rev)) + dc_version =DCE_VERSION_6_0 ; +else if (ASIC_REV_IS_OLAND_M (asic_id.hw_internal_rev)) + dc_version =DCE_VERSION_6_4 ; +else + dc_version =DCE_VERSION_6_1 ; +break ; +#endif case FAMILY_CI : dc_version =DCE_VERSION_8_0 ;break ;
@@ -106,6 +121,20 @@ struct resource_pool *dc_create_resource_pool(struct resource_pool *res_pool =NULL ;switch (dc_version) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : + res_pool =dce60_create_resource_pool ( + num_virtual_links, dc); +break ; +case DCE_VERSION_6_1 : + res_pool =dce61_create_resource_pool ( + num_virtual_links, dc); +break ; +case DCE_VERSION_6_4 : + res_pool =dce64_create_resource_pool ( + num_virtual_links, dc); +break ; +#endif case DCE_VERSION_8_0 : res_pool =dce80_create_resource_pool ( num_virtual_links, dc);
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/10 drm/amd/display: dc/bios: add support for DCE6
In reply to a message not in the archiveDCE6 targets are added replicating existing DCE8 implementation.
--- drivers/gpu/drm/amd/display/dc/bios/Makefile | 9 + .../display/dc/bios/command_table_helper.c | 8 + .../display/dc/bios/command_table_helper.h | 3 + .../display/dc/bios/command_table_helper2.c | 8 + .../display/dc/bios/command_table_helper2.h | 3 + .../bios/dce60/command_table_helper_dce60.c | 354 ++++++++++++++++++ .../bios/dce60/command_table_helper_dce60.h | 33 ++ 7 files changed, 418 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/bios/dce60/command_table_helper_dce60.c create mode 100644 drivers/gpu/drm/amd/display/dc/bios/dce60/command_table_helper_dce60.h
drivers/gpu/drm/amd/display/dc/bios/Makefile +9 -0
@@ -31,6 +31,15 @@ AMD_DAL_BIOS = $(addprefix $(AMDDALPATH)/dc/bios/,$(BIOS)) AMD_DISPLAY_FILES += $(AMD_DAL_BIOS) +############################################################################### +# DCE 6x +############################################################################### +# All DCE6.x are derived from DCE6.0, so 6.0 MUST be defined if ANY of +# DCE6.x is compiled. +ifdef CONFIG_DRM_AMD_DC_SI +AMD_DISPLAY_FILES += $(AMDDALPATH)/dc/bios/dce60/command_table_helper_dce60.o +endif + ############################################################################### # DCE 8x ###############################################################################
drivers/gpu/drm/amd/display/dc/bios/command_table_helper.c +8 -0
@@ -36,6 +36,14 @@ bool dal_bios_parser_init_cmd_tbl_helper( enum dce_version dce) {switch (dce) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : +case DCE_VERSION_6_1 : +case DCE_VERSION_6_4 : + *h =dal_cmd_tbl_helper_dce60_get_table (); +return true; +#endif +case DCE_VERSION_8_0 :case DCE_VERSION_8_1 :case DCE_VERSION_8_3 :
drivers/gpu/drm/amd/display/dc/bios/command_table_helper.h +3 -0
@@ -26,6 +26,9 @@#ifndef __DAL_COMMAND_TABLE_HELPER_H__#define __DAL_COMMAND_TABLE_HELPER_H__ +#if defined(CONFIG_DRM_AMD_DC_SI ) +#include "dce60/command_table_helper_dce60.h" +#endif #include "dce80/command_table_helper_dce80.h" #include "dce110/command_table_helper_dce110.h" #include "dce112/command_table_helper_dce112.h"
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c +8 -0
@@ -37,6 +37,14 @@ bool dal_bios_parser_init_cmd_tbl_helper2( enum dce_version dce) {switch (dce) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : +case DCE_VERSION_6_1 : +case DCE_VERSION_6_4 : + *h =dal_cmd_tbl_helper_dce60_get_table (); +return true; +#endif +case DCE_VERSION_8_0 :case DCE_VERSION_8_1 :case DCE_VERSION_8_3 :
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.h +3 -0
@@ -26,6 +26,9 @@#ifndef __DAL_COMMAND_TABLE_HELPER2_H__#define __DAL_COMMAND_TABLE_HELPER2_H__ +#if defined(CONFIG_DRM_AMD_DC_SI ) +#include "dce60/command_table_helper_dce60.h" +#endif #include "dce80/command_table_helper_dce80.h" #include "dce110/command_table_helper_dce110.h" #include "dce112/command_table_helper2_dce112.h"
drivers/gpu/drm/amd/display/dc/bios/dce60/command_table_helper_dce60.c new file +354 -0
354 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/bios/dce60/command_table_helper_dce60.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Copyright 2012-15 Advanced Micro Devices, 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, sublicense, +* 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 above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 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 NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. +* +* Authors: AMD +* +*/ + +#ifndef __DAL_COMMAND_TABLE_HELPER_DCE60_H__ +#define __DAL_COMMAND_TABLE_HELPER_DCE60_H__ + +struct command_table_helper ; + +const struct command_table_helper *dal_cmd_tbl_helper_dce60_get_table (void ); + +#endif
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/10 drm/amd/display: dc/gpio: add support for DCE6
In reply to a message not in the archiveDCE6 targets are added replicating existing DCE8 implementation.
--- drivers/gpu/drm/amd/display/dc/gpio/Makefile | 12 + .../display/dc/gpio/dce60/hw_factory_dce60.c | 174 ++++++++ .../display/dc/gpio/dce60/hw_factory_dce60.h | 32 ++ .../dc/gpio/dce60/hw_translate_dce60.c | 411 ++++++++++++++++++ .../dc/gpio/dce60/hw_translate_dce60.h | 32 ++ .../gpu/drm/amd/display/dc/gpio/hw_factory.c | 10 + .../drm/amd/display/dc/gpio/hw_translate.c | 10 + 7 files changed, 681 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dce60/hw_factory_dce60.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dce60/hw_factory_dce60.h create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dce60/hw_translate_dce60.c create mode 100644 drivers/gpu/drm/amd/display/dc/gpio/dce60/hw_translate_dce60.h
drivers/gpu/drm/amd/display/dc/gpio/Makefile +12 -0
@@ -30,6 +30,18 @@ AMD_DAL_GPIO = $(addprefix $(AMDDALPATH)/dc/gpio/,$(GPIO)) AMD_DISPLAY_FILES += $(AMD_DAL_GPIO) +############################################################################### +# DCE 6x +############################################################################### +# all DCE6.x are derived from DCE6.0 +ifdef CONFIG_DRM_AMD_DC_SI +GPIO_DCE60 = hw_translate_dce60.o hw_factory_dce60.o + +AMD_DAL_GPIO_DCE60 = $(addprefix $(AMDDALPATH)/dc/gpio/dce60/,$(GPIO_DCE60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCE60) +endif + ############################################################################### # DCE 8x ###############################################################################
drivers/gpu/drm/amd/display/dc/gpio/dce60/hw_factory_dce60.c new file +174 -0
174 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/gpio/dce60/hw_factory_dce60.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright 2012-15 Advanced Micro Devices, 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, sublicense, +* 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 above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 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 NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. +* +* Authors: AMD +* +*/ + +#ifndef __DAL_HW_FACTORY_DCE60_H__ +#define __DAL_HW_FACTORY_DCE60_H__ + +void dal_hw_factory_dce60_init ( +struct hw_factory *factory); + +#endif
drivers/gpu/drm/amd/display/dc/gpio/dce60/hw_translate_dce60.c new file +411 -0
411 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/gpio/dce60/hw_translate_dce60.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* Copyright 2012-15 Advanced Micro Devices, 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, sublicense, +* 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 above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 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 NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. +* +* Authors: AMD +* +*/ + +#ifndef __DAL_HW_TRANSLATE_DCE60_H__ +#define __DAL_HW_TRANSLATE_DCE60_H__ + +void dal_hw_translate_dce60_init ( +struct hw_translate *tr); + +#endif
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c +10 -0
@@ -40,6 +40,9 @@* Post-requisites: headers required by this unit */ +#if defined(CONFIG_DRM_AMD_DC_SI ) +#include "dce60/hw_factory_dce60.h" +#endif #include "dce80/hw_factory_dce80.h" #include "dce110/hw_factory_dce110.h" #include "dce120/hw_factory_dce120.h"
@@ -64,6 +67,13 @@ bool dal_hw_factory_init( }switch (dce_version) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : +case DCE_VERSION_6_1 : +case DCE_VERSION_6_4 : +dal_hw_factory_dce60_init (factory); +return true; +#endif case DCE_VERSION_8_0 :case DCE_VERSION_8_1 :case DCE_VERSION_8_3 :
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c +10 -0
@@ -40,6 +40,9 @@* Post-requisites: headers required by this unit */ +#if defined(CONFIG_DRM_AMD_DC_SI ) +#include "dce60/hw_translate_dce60.h" +#endif #include "dce80/hw_translate_dce80.h" #include "dce110/hw_translate_dce110.h" #include "dce120/hw_translate_dce120.h"
@@ -64,6 +67,13 @@ bool dal_hw_translate_init( }switch (dce_version) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : +case DCE_VERSION_6_1 : +case DCE_VERSION_6_4 : +dal_hw_translate_dce60_init (translate); +return true; +#endif case DCE_VERSION_8_0 :case DCE_VERSION_8_1 :case DCE_VERSION_8_3 :
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 6/10 drm/amd/display: dc/i2caux: add support for DCE6
In reply to a message not in the archiveDCE6 targets are added replicating existing DCE8 implementation.
--- .../gpu/drm/amd/display/dc/i2caux/Makefile | 12 + .../dc/i2caux/dce60/i2c_hw_engine_dce60.c | 875 ++++++++++++++++++ .../dc/i2caux/dce60/i2c_hw_engine_dce60.h | 54 ++ .../dc/i2caux/dce60/i2c_sw_engine_dce60.c | 173 ++++ .../dc/i2caux/dce60/i2c_sw_engine_dce60.h | 43 + .../display/dc/i2caux/dce60/i2caux_dce60.c | 284 ++++++ .../display/dc/i2caux/dce60/i2caux_dce60.h | 38 + .../gpu/drm/amd/display/dc/i2caux/i2caux.c | 10 + 8 files changed, 1489 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2c_hw_engine_dce60.c create mode 100644 drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2c_hw_engine_dce60.h create mode 100644 drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2c_sw_engine_dce60.c create mode 100644 drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2c_sw_engine_dce60.h create mode 100644 drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2caux_dce60.c create mode 100644 drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2caux_dce60.h
drivers/gpu/drm/amd/display/dc/i2caux/Makefile +12 -0
@@ -30,6 +30,18 @@ AMD_DAL_I2CAUX = $(addprefix $(AMDDALPATH)/dc/i2caux/,$(I2CAUX)) AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX) +############################################################################### +# DCE 6x family +############################################################################### +ifdef CONFIG_DRM_AMD_DC_SI +I2CAUX_DCE60 = i2caux_dce60.o i2c_hw_engine_dce60.o \ + i2c_sw_engine_dce60.o + +AMD_DAL_I2CAUX_DCE60 = $(addprefix $(AMDDALPATH)/dc/i2caux/dce60/,$(I2CAUX_DCE60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DCE60) +endif + ############################################################################### # DCE 8x family ###############################################################################
drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2c_hw_engine_dce60.c new file +875 -0
875 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2c_hw_engine_dce60.h new file +54 -0
54 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2c_sw_engine_dce60.c new file +173 -0
173 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2c_sw_engine_dce60.h new file +43 -0
43 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2caux_dce60.c new file +284 -0
284 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/i2caux/dce60/i2caux_dce60.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Copyright 2012-15 Advanced Micro Devices, 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, sublicense, +* 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 above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 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 NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. +* +* Authors: AMD +* +*/ + +#ifndef __DAL_I2C_AUX_DCE60_H__ +#define __DAL_I2C_AUX_DCE60_H__ + +struct i2caux_dce60 { +struct i2caux base; +/* indicate the I2C HW circular buffer is in use */ +bool i2c_hw_buffer_in_use; +}; + +struct i2caux *dal_i2caux_dce60_create ( +struct dc_context *ctx); + +#endif
drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c +10 -0
@@ -49,6 +49,10 @@* This unit */ +#if defined(CONFIG_DRM_AMD_DC_SI ) +#include "dce60/i2caux_dce60.h" +#endif +#include "dce80/i2caux_dce80.h" #include "dce100/i2caux_dce100.h"
@@ -78,6 +82,12 @@ struct i2caux *dal_i2caux_create( }switch (ctx->dce_version) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case DCE_VERSION_6_0 : +case DCE_VERSION_6_1 : +case DCE_VERSION_6_4 : +return dal_i2caux_dce60_create (ctx); +#endif case DCE_VERSION_8_0 :case DCE_VERSION_8_1 :case DCE_VERSION_8_3 :
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 7/10 drm/amd/display: dc/irq: add support for DCE6
In reply to a message not in the archiveDCE6 targets are added replicating existing DCE8 implementation.
NOTE: due to missing CRTC_VERTICAL_INTERRUPT0_CONTROL registers/masks, dce/dce_8_0_{d,sh_mask}.h headers were used instead of dce/dce_6_0_{d,sh_mask}.h but only as exception in dce/irq_service_dce60.c
IMPORTANT: Coding of dce/irq_service_dce60.c requires review to understand if dce_6_0_{d,sh_mask}.h should be updated with macros/registers/masks
--- drivers/gpu/drm/amd/display/dc/irq/Makefile | 11 + .../display/dc/irq/dce60/irq_service_dce60.c | 303 ++++++++++++++++++ .../display/dc/irq/dce60/irq_service_dce60.h | 35 ++ .../gpu/drm/amd/display/dc/irq/irq_service.c | 3 + 4 files changed, 352 insertions(+) create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.c create mode 100644 drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.h
drivers/gpu/drm/amd/display/dc/irq/Makefile +11 -0
@@ -30,6 +30,17 @@ AMD_DAL_IRQ = $(addprefix $(AMDDALPATH)/dc/irq/,$(IRQ)) AMD_DISPLAY_FILES += $(AMD_DAL_IRQ) +############################################################################### +# DCE 6x +############################################################################### +ifdef CONFIG_DRM_AMD_DC_SI +IRQ_DCE60 = irq_service_dce60.o + +AMD_DAL_IRQ_DCE60 = $(addprefix $(AMDDALPATH)/dc/irq/dce60/,$(IRQ_DCE60)) + +AMD_DISPLAY_FILES += $(AMD_DAL_IRQ_DCE60) +endif + ############################################################################### # DCE 8x ###############################################################################
drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.c new file +303 -0
303 lines not on this page · raw message
drivers/gpu/drm/amd/display/dc/irq/dce60/irq_service_dce60.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright 2012-15 Advanced Micro Devices, 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, sublicense, +* 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 above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* 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 NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. +* +* Authors: AMD +* +*/ + +#ifndef __DAL_IRQ_SERVICE_DCE60_H__ +#define __DAL_IRQ_SERVICE_DCE60_H__ + +#include "../irq_service.h" + +struct irq_service *dal_irq_service_dce60_create ( +struct irq_service_init_data *init_data); + +#endif +
drivers/gpu/drm/amd/display/dc/irq/irq_service.c +3 -0
@@ -30,6 +30,9 @@#include "dce110/irq_service_dce110.h" +#if defined(CONFIG_DRM_AMD_DC_SI ) +#include "dce60/irq_service_dce60.h" +#endif #include "dce80/irq_service_dce80.h"
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 8/10 drm/amd/display: amdgpu_dm: add SI support
In reply to a message not in the archiveThis commit adds Display Manager early initialization for SI parts conditionally to CONFIG_DRM_AMD_DC_SI kernel configuration
--- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +24 -0
@@ -1638,6 +1638,13 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)/* Software is initialized. Now we can register interrupt handlers. */ switch (adev->asic_type) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : +case CHIP_OLAND : +case CHIP_HAINAN : +#endif case CHIP_BONAIRE :case CHIP_HAWAII :case CHIP_KAVERI :
@@ -1782,6 +1789,23 @@ static int dm_early_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;switch (adev->asic_type) { +#if defined(CONFIG_DRM_AMD_DC_SI ) +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : +case CHIP_HAINAN : + adev->mode_info.num_crtc =6 ; + adev->mode_info.num_hpd =6 ; + adev->mode_info.num_dig =6 ; + adev->mode_info.plane_type = dm_plane_type_default; +break ; +case CHIP_OLAND : + adev->mode_info.num_crtc =2 ; + adev->mode_info.num_hpd =2 ; + adev->mode_info.num_dig =2 ; + adev->mode_info.plane_type = dm_plane_type_default; +break ; +#endif case CHIP_BONAIRE :case CHIP_HAWAII : adev->mode_info.num_crtc =6 ;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 9/10 drm/amdgpu: enable DC support for SI parts
In reply to a message not in the archiveThis commit enables DC support and Display Manager IP block conditionally to CONFIG_DRM_AMD_DC_SI kernel configuration
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/si.c | 14 ++++++++++++++ 2 files changed, 21 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -0
@@ -2250,6 +2250,13 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type) {switch (asic_type) {#if defined(CONFIG_DRM_AMD_DC ) +#if defined(CONFIG_DRM_AMD_DC_SI ) +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : +case CHIP_OLAND : +case CHIP_HAINAN : +#endif case CHIP_BONAIRE :case CHIP_HAWAII :case CHIP_KAVERI :
drivers/gpu/drm/amd/amdgpu/si.c +14 -0
@@ -48,6 +48,8 @@#include "uvd/uvd_4_0_d.h" #include "bif/bif_3_0_d.h" +#include "amdgpu_dm.h" +static const u32 tahiti_golden_registers[] = { mmAZALIA_SCLK_CONTROL,0x00000030 ,0x00000011 ,
@@ -2060,6 +2062,10 @@ int si_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &si_smu_ip_block);if (adev->enable_virtual_display)amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block); +#if defined(CONFIG_DRM_AMD_DC ) && defined(CONFIG_DRM_AMD_DC_SI ) + else if (amdgpu_device_has_dc_support(adev)) + amdgpu_device_ip_block_add(adev, &dm_ip_block); +#endif else amdgpu_device_ip_block_add(adev, &dce_v6_0_ip_block);amdgpu_device_ip_block_add (adev, &gfx_v6_0_ip_block);
@@ -2074,6 +2080,10 @@ int si_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &si_smu_ip_block);if (adev->enable_virtual_display)amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block); +#if defined(CONFIG_DRM_AMD_DC ) && defined(CONFIG_DRM_AMD_DC_SI ) + else if (amdgpu_device_has_dc_support(adev)) + amdgpu_device_ip_block_add(adev, &dm_ip_block); +#endif else amdgpu_device_ip_block_add(adev, &dce_v6_4_ip_block);amdgpu_device_ip_block_add (adev, &gfx_v6_0_ip_block);
@@ -2088,6 +2098,10 @@ int si_set_ip_blocks(struct amdgpu_device *adev)amdgpu_device_ip_block_add (adev, &si_smu_ip_block);if (adev->enable_virtual_display)amdgpu_device_ip_block_add (adev, &dce_virtual_ip_block); +#if defined(CONFIG_DRM_AMD_DC ) && defined(CONFIG_DRM_AMD_DC_SI ) + else if (amdgpu_device_has_dc_support(adev)) + amdgpu_device_ip_block_add(adev, &dm_ip_block); +#endif amdgpu_device_ip_block_add (adev, &gfx_v6_0_ip_block);amdgpu_device_ip_block_add (adev, &si_dma_ip_block);break ;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 10/10 drm/amd/display: enable SI support in the Kconfig
In reply to a message not in the archiveCONFIG_DRM_AMD_DC_SI configuration option is added, default setting is disabled
--- drivers/gpu/drm/amd/display/Kconfig | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/amd/display/Kconfig +8 -0
@@ -15,6 +15,14 @@ config DRM_AMD_DC_DCN1_0 help RV family support for display engine +config DRM_AMD_DC_SI + bool "AMD DC support for Southern Islands ASICs" + default n + help + Choose this option to enable new AMD DC support for SI asics + by default. This includes Tahiti, Pitcairn, Cape Verde, Oland + and Hainan. + config DEBUG_KERNEL_DC bool "Enable kgdb break in DC" depends on DRM_AMD_DC
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Mauro
Do you know if there are any plans to add in UVD support on SI too?
Thanks
Mike
Quoted 94 lines · On Mon, 8 Oct 2018 at 03:24 Mauro Rossi <issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@pub…
[PATCH 01/10] drm/amd/display: add asics info for SI parts [PATCH 02/10] drm/amd/display: dc/dce: add DCE6 support [PATCH 03/10] drm/amd/display: dc/core: add DCE6 support [PATCH 04/10] drm/amd/display: dc/bios: add support for DCE6 [PATCH 05/10] drm/amd/display: dc/gpio: add support for DCE6 [PATCH 06/10] drm/amd/display: dc/i2caux: add support for DCE6 [PATCH 07/10] drm/amd/display: dc/irq: add support for DCE6 [PATCH 08/10] drm/amd/display:
amdgpu_dm: add SI support [PATCH 09/10] drm/amdgpu: enable DC support for SI parts [PATCH 10/10] drm/amd/display: enable SI support in theKconfigThe series adds preliminar SI support as a Proof Of Concept, based on the idea that DCE6 is similar to DCE8, to be reviewed and refined
Android-x86 need/motivation lies in the following chain of dependencies:
Vulkan radv requires gbm grallocprime_fdsupport,
gbm gralloc requires drm hwcomposer,
drm hwcomposer requires Atomic Display Framework,
Atomic Display Framework requires AMD DC, currently not supporting SI.So the goals are:
1) to get Vulkan radv working on SI parts for android-x86.
2) to remove the gap in SI (GCN 1st gen) not having atomic support.DCE6 specific code was implemented as a replica of existing DCE8 support and based on how DCE8 specific code was added on top of DCE10,11 support by adding dce60* sources, functions, macros for each existing in dce80*
CONFIG_DRM_AMD_DC_SIparameter has been added to control SI support in DCDuring this first iteration of review, there are aspects to verify:
- dce60 code has been added mechanically, so there may be redundancies and space for refactoring part of the code
-dce60_resourceswas having too many building errors due to missing DCE6 macros
in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- gfx6 may require some ad hoc initialization, skipped for the moment
- Hainan specific code requires review, as some documentation and code paths
seem to point that famility may not have DCE6, please confirm
- video decoding blocks code have not been touched
- dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
- dc/dce/dce_dmcu.{c,h} may be missing some SI/DCE6 specifics
-dc/dce/dce_hwseq.hmay be missing some SI/DCE6 specifics
-dc/dce/dce_link_encoder.hmay be missing some SI/DCE6 specifics
-dc/dce/dce_stream_encoder.hmay be missing some SI/DCE6 specifics
- dc/amdgpu_dm/* changes may be incomplete
- Any other omissis to be reviewed
- Feedback on best testing strategy requiredReview from an expert of the DC impacted modules is recommended
SW Layer
/===============================================================\| DC Display Timing Mode Asic | | Interface Service Service Manager Capability* | | | | Display Topology Display Link Adapter | | Path Manager Capability Service Service | | Service | |---------------------------------------------------------------| | GPIO* IRQ I2cAux HW BIOS | | Service** Manager* Sequencer* Parser* | | | | Connector Encoder Audio GPU Controller | | |\===============================================================/
HW LayerLegend:
*dce60 support was added cleanly with dce_6_0_{d,sh_mask}.h headers **dce60 support was added using dce_8_0_{d,sh_mask}.h headersAndroid-x86 preliminary tests results:
[Boots with drm gralloc]
3DMark Slingshot
GFXbench OpenGLES benchmarks OK
V1 GPU benchmark (OpenGLES) OK
Regression in Google Chrome, Youtube (app does not show up) Regression in Olympus Rising, Chicken Invaders (app does not show up)[Boots with drm hwcomposer + gbm gralloc]
Google Chrome, Youtube are OK
Vulkan radv HAL API becomes available with hwc+gbm gralloc V1 GPU benchmark (Vulkan API) OK
Sacha Willems examples OK
Some glitch/freeze in 3DMark Slingshot Extreeme and API overheadKind regards
Quoted 8 lines
Mauro Rossi
android-x86 team_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CAHbf0-HK4W4xE-hOJPiwr8zhzuuG2GobCTyHHik3mwe1-9_BmQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi Mike,
Quoted 8 lines · Mike Lothian
Hi Mauro
Do you know if there are any plans to add in UVD support on SI too?
Thanks
Mike
At the moment my focus is on getting a conformant, working and stable implementation of Atomic Display Framework, with the objective to have it upstreamed to amd-gfx branch, then staging (drm-next) and maybe merged in linux kernel.
To be honest my attempt is based on code paths inspection and mimicking, so in this moment I do not even know the state of UVD and what changes are needed,
but, based on what I saw for DCE6 support addition on top of DCE8, covering all compatible HW modules makes a lot of sense and it is an opportunity to exploit,
if feasible.
For this to happen in most complete and reliable way the feedback of staff who worked on DAL/DC
will be essential, because what I did now was to adapt code for DCE8 to work for DCE6,
but it was like an "optimistic monkey with a keyboard" approach, with all due respect for monkeys with keyboards,
:-) I may have missed dozen of changes.
Mauro
Quoted 97 lines · On Mon, 8 Oct 2018 at 03:24 Mauro Rossi <issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@pub…
Quoted 95 lines
[PATCH 01/10] drm/amd/display: add asics info for SI parts [PATCH 02/10] drm/amd/display: dc/dce: add DCE6 support [PATCH 03/10] drm/amd/display: dc/core: add DCE6 support [PATCH 04/10] drm/amd/display: dc/bios: add support for DCE6 [PATCH 05/10] drm/amd/display: dc/gpio: add support for DCE6 [PATCH 06/10] drm/amd/display: dc/i2caux: add support for DCE6 [PATCH 07/10] drm/amd/display: dc/irq: add support for DCE6 [PATCH 08/10] drm/amd/display:
amdgpu_dm: add SI support [PATCH 09/10] drm/amdgpu: enable DC support for SI parts [PATCH 10/10] drm/amd/display: enable SI support in theKconfigThe series adds preliminar SI support as a Proof Of Concept, based on the idea that DCE6 is similar to DCE8, to be reviewed and refined
Android-x86 need/motivation lies in the following chain of dependencies:
Vulkan radv requires gbm grallocprime_fdsupport,
gbm gralloc requires drm hwcomposer,
drm hwcomposer requires Atomic Display Framework,
Atomic Display Framework requires AMD DC, currently not supporting SI.So the goals are:
1) to get Vulkan radv working on SI parts for android-x86.
2) to remove the gap in SI (GCN 1st gen) not having atomic support.DCE6 specific code was implemented as a replica of existing DCE8 support and based on how DCE8 specific code was added on top of DCE10,11 support by adding dce60* sources, functions, macros for each existing in dce80*
CONFIG_DRM_AMD_DC_SIparameter has been added to control SI support in DCDuring this first iteration of review, there are aspects to verify:
- dce60 code has been added mechanically, so there may be redundancies and space for refactoring part of the code
-dce60_resourceswas having too many building errors due to missing DCE6 macros
in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- gfx6 may require some ad hoc initialization, skipped for the moment
- Hainan specific code requires review, as some documentation and code paths
seem to point that famility may not have DCE6, please confirm
- video decoding blocks code have not been touched
- dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
- dc/dce/dce_dmcu.{c,h} may be missing some SI/DCE6 specifics
-dc/dce/dce_hwseq.hmay be missing some SI/DCE6 specifics
-dc/dce/dce_link_encoder.hmay be missing some SI/DCE6 specifics
-dc/dce/dce_stream_encoder.hmay be missing some SI/DCE6 specifics
- dc/amdgpu_dm/* changes may be incomplete
- Any other omissis to be reviewed
- Feedback on best testing strategy requiredReview from an expert of the DC impacted modules is recommended
SW Layer
/===============================================================\| DC Display Timing Mode Asic | | Interface Service Service Manager Capability* | | | | Display Topology Display Link Adapter | | Path Manager Capability Service Service | | Service | |---------------------------------------------------------------| | GPIO* IRQ I2cAux HW BIOS | | Service** Manager* Sequencer* Parser* | | | | Connector Encoder Audio GPU Controller | | |\===============================================================/
HW LayerLegend:
*dce60 support was added cleanly with dce_6_0_{d,sh_mask}.h headers **dce60 support was added using dce_8_0_{d,sh_mask}.h headersAndroid-x86 preliminary tests results:
[Boots with drm gralloc]
3DMark Slingshot
GFXbench OpenGLES benchmarks OK
V1 GPU benchmark (OpenGLES) OK
Regression in Google Chrome, Youtube (app does not show up) Regression in Olympus Rising, Chicken Invaders (app does not show up)[Boots with drm hwcomposer + gbm gralloc]
Google Chrome, Youtube are OK
Vulkan radv HAL API becomes available with hwc+gbm gralloc V1 GPU benchmark (Vulkan API) OK
Sacha Willems examples OK
Some glitch/freeze in 3DMark Slingshot Extreeme and API overheadKind regards
Quoted 9 lines
Quoted 8 lines
Mauro Rossi
android-x86 team_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CAEQFVGbWWy7jmcaserbMwANNHei90WX+1AvOfDAY8J=BcsyCrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
UVD/VCE on SI with amdgpu would need new firmware.
And so far we never had time to actually look into releasing that firmware.
Regards,
Christian.
Am 08.10.2018 um 13:22 schrieb Mauro Rossi:
Quoted 154 lines
Hi Mike,
On Mon, Oct 8, 2018 at 1:00 PM Mike Lothian <[email protected] <mailto:[email protected]>> wrote:Hi Mauro
Do you know if there are any plans to add in UVD support on SI too?
Thanks
Mike
At the moment my focus is on getting a conformant, working and stable implementation of Atomic Display Framework, with the objective to have it upstreamed to amd-gfx branch, then staging (drm-next) and maybe merged in linux kernel.
To be honest my attempt is based on code paths inspection and mimicking,
so in this moment I do not even know the state of UVD and what changes are needed, but, based on what I saw for DCE6 support addition on top of DCE8,
covering all compatible HW modules makes a lot of sense and it is an opportunity to exploit, if feasible.For this to happen in most complete and reliable way the feedback of staff who worked on DAL/DC will be essential, because what I did now was to adapt code for DCE8 to work for DCE6,
but it was like an "optimistic monkey with a keyboard" approach, with all due respect for monkeys with keyboards, :-) I may have missed dozen of changes.Mauro
On Mon, 8 Oct 2018 at 03:24 Mauro Rossi <[email protected] <mailto:[email protected]>> wrote:
[PATCH 01/10] drm/amd/display: add asics info for SI parts [PATCH 02/10] drm/amd/display: dc/dce: add DCE6 support [PATCH 03/10] drm/amd/display: dc/core: add DCE6 support [PATCH 04/10] drm/amd/display: dc/bios: add support for DCE6 [PATCH 05/10] drm/amd/display: dc/gpio: add support for DCE6 [PATCH 06/10] drm/amd/display: dc/i2caux: add support for DCE6 [PATCH 07/10] drm/amd/display: dc/irq: add support for DCE6 [PATCH 08/10] drm/amd/display:
amdgpu_dm: add SI support [PATCH 09/10] drm/amdgpu: enable DC support for SI parts [PATCH 10/10] drm/amd/display: enable SI support in theKconfigThe series adds preliminar SI support as a Proof Of Concept, based on the idea that DCE6 is similar to DCE8, to be reviewed and refined
Android-x86 need/motivation lies in the following chain of dependencies:
Vulkan radv requires gbm grallocprime_fdsupport, gbm gralloc requires drm hwcomposer,
drm hwcomposer requires Atomic Display Framework, Atomic Display Framework requires AMD DC, currently not supporting SI.So the goals are:
1) to get Vulkan radv working on SI parts for android-x86.
2) to remove the gap in SI (GCN 1st gen) not having atomic support.DCE6 specific code was implemented as a replica of existing DCE8 support
and based on how DCE8 specific code was added on top of DCE10,11 support
by adding dce60* sources, functions, macros for each existing in dce80*
CONFIG_DRM_AMD_DC_SIparameter has been added to control SI support in DCDuring this first iteration of review, there are aspects to verify:
- dce60 code has been added mechanically, so there may be redundancies
and space for refactoring part of the code
-dce60_resourceswas having too many building errors due to missing DCE6 macros
in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers
were used for the PoC
- dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- gfx6 may require some ad hoc initialization, skipped for the moment
- Hainan specific code requires review, as some documentation and code paths
seem to point that famility may not have DCE6, please confirm
- video decoding blocks code have not been touched
- dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
- dc/dce/dce_dmcu.{c,h} may be missing some SI/DCE6 specifics
-dc/dce/dce_hwseq.hmay be missing some SI/DCE6 specifics
-dc/dce/dce_link_encoder.hmay be missing some SI/DCE6 specifics
-dc/dce/dce_stream_encoder.hmay be missing some SI/DCE6 specifics
- dc/amdgpu_dm/* changes may be incomplete
- Any other omissis to be reviewed
- Feedback on best testing strategy requiredReview from an expert of the DC impacted modules is recommended
SW Layer /===============================================================\
| DC Display Timing Mode Asic | | Interface Service Service Manager Capability* | | |
| Display Topology Display Link Adapter | | Path Manager Capability Service Service | | Service | |---------------------------------------------------------------| | GPIO* IRQ I2cAux HW BIOS | | Service** Manager* Sequencer* Parser* | | |
| Connector Encoder Audio GPU Controller | | | \===============================================================/ HW LayerLegend:
*dce60 support was added cleanly with dce_6_0_{d,sh_mask}.h headers
**dce60 support was added using dce_8_0_{d,sh_mask}.h headersAndroid-x86 preliminary tests results:
[Boots with drm gralloc]
3DMark Slingshot
GFXbench OpenGLES benchmarks OK
V1 GPU benchmark (OpenGLES) OK
Regression in Google Chrome, Youtube (app does not show up) Regression in Olympus Rising, Chicken Invaders (app does not show up)[Boots with drm hwcomposer + gbm gralloc]
Google Chrome, Youtube are OK
Vulkan radv HAL API becomes available with hwc+gbm gralloc V1 GPU benchmark (Vulkan API) OK
Sacha Willems examples OK
Some glitch/freeze in 3DMark Slingshot Extreeme and API overheadKind regards
Mauro Rossi
android-x86 team_______________________________________________
amd-gfx mailing list [email protected] <mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 4 lines
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 7a8b5d6d-82c2-2b98-b2b2-098baf095aef-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
I thought it just required the existing firmware, with padding / extra info put around it?
Quoted 155 lines · On Mon, 8 Oct 2018 at 12:29 Christian König <…
UVD/VCE on SI with amdgpu would need new firmware.
And so far we never had time to actually look into releasing that firmware.
Regards,
Christian.Am 08.10.2018 um 13:22 schrieb Mauro Rossi:
Hi Mike,
Quoted 8 lines · Mike Lothian
Hi Mauro
Do you know if there are any plans to add in UVD support on SI too?
Thanks
Mike
At the moment my focus is on getting a conformant, working and stable implementation of Atomic Display Framework, with the objective to have it upstreamed to amd-gfx branch, then staging (drm-next) and maybe merged in linux kernel.
To be honest my attempt is based on code paths inspection and mimicking, so in this moment I do not even know the state of UVD and what changes are needed,
but, based on what I saw for DCE6 support addition on top of DCE8, covering all compatible HW modules makes a lot of sense and it is an opportunity to exploit,
if feasible.For this to happen in most complete and reliable way the feedback of staff who worked on DAL/DC
will be essential, because what I did now was to adapt code for DCE8 to work for DCE6,
but it was like an "optimistic monkey with a keyboard" approach, with all due respect for monkeys with keyboards,
:-) I may have missed dozen of changes.Mauro
Quoted 99 lines · On Mon, 8 Oct 2018 at 03:24 Mauro Rossi <issor.oruam-Re5JQEeQqe8AvxtiuMwx3w@pub…
Quoted 97 lines
[PATCH 01/10] drm/amd/display: add asics info for SI parts [PATCH 02/10] drm/amd/display: dc/dce: add DCE6 support [PATCH 03/10] drm/amd/display: dc/core: add DCE6 support [PATCH 04/10] drm/amd/display: dc/bios: add support for DCE6 [PATCH 05/10] drm/amd/display: dc/gpio: add support for DCE6 [PATCH 06/10] drm/amd/display: dc/i2caux: add support for DCE6 [PATCH 07/10] drm/amd/display: dc/irq: add support for DCE6 [PATCH 08/10] drm/amd/display:
amdgpu_dm: add SI support [PATCH 09/10] drm/amdgpu: enable DC support for SI parts [PATCH 10/10] drm/amd/display: enable SI support in theKconfigThe series adds preliminar SI support as a Proof Of Concept, based on the idea that DCE6 is similar to DCE8, to be reviewed and refined
Android-x86 need/motivation lies in the following chain of dependencies:
Vulkan radv requires gbm grallocprime_fdsupport,
gbm gralloc requires drm hwcomposer,
drm hwcomposer requires Atomic Display Framework,
Atomic Display Framework requires AMD DC, currently not supporting SI.So the goals are:
1) to get Vulkan radv working on SI parts for android-x86.
2) to remove the gap in SI (GCN 1st gen) not having atomic support.DCE6 specific code was implemented as a replica of existing DCE8 support and based on how DCE8 specific code was added on top of DCE10,11 support by adding dce60* sources, functions, macros for each existing in dce80*
CONFIG_DRM_AMD_DC_SIparameter has been added to control SI support in DCDuring this first iteration of review, there are aspects to verify:
- dce60 code has been added mechanically, so there may be redundancies and space for refactoring part of the code
-dce60_resourceswas having too many building errors due to missing DCE6 macros
in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers
were used for the PoC
- dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- gfx6 may require some ad hoc initialization, skipped for the moment
- Hainan specific code requires review, as some documentation and code paths
seem to point that famility may not have DCE6, please confirm
- video decoding blocks code have not been touched
- dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
- dc/dce/dce_dmcu.{c,h} may be missing some SI/DCE6 specifics
-dc/dce/dce_hwseq.hmay be missing some SI/DCE6 specifics
-dc/dce/dce_link_encoder.hmay be missing some SI/DCE6 specifics
-dc/dce/dce_stream_encoder.hmay be missing some SI/DCE6 specifics
- dc/amdgpu_dm/* changes may be incomplete
- Any other omissis to be reviewed
- Feedback on best testing strategy requiredReview from an expert of the DC impacted modules is recommended
SW Layer
/===============================================================\| DC Display Timing Mode Asic | | Interface Service Service Manager Capability* | | | | Display Topology Display Link Adapter | | Path Manager Capability Service Service | | Service | |---------------------------------------------------------------| | GPIO* IRQ I2cAux HW BIOS | | Service** Manager* Sequencer* Parser* | | | | Connector Encoder Audio GPU Controller | | |\===============================================================/
HW LayerLegend:
*dce60 support was added cleanly with dce_6_0_{d,sh_mask}.h headers **dce60 support was added using dce_8_0_{d,sh_mask}.h headersAndroid-x86 preliminary tests results:
[Boots with drm gralloc]
3DMark Slingshot
GFXbench OpenGLES benchmarks OK
V1 GPU benchmark (OpenGLES) OK
Regression in Google Chrome, Youtube (app does not show up) Regression in Olympus Rising, Chicken Invaders (app does not show up)[Boots with drm hwcomposer + gbm gralloc]
Google Chrome, Youtube are OK
Vulkan radv HAL API becomes available with hwc+gbm gralloc V1 GPU benchmark (Vulkan API) OK
Sacha Willems examples OK
Some glitch/freeze in 3DMark Slingshot Extreeme and API overheadKind regards
Quoted 9 lines
Quoted 8 lines
Mauro Rossi
android-x86 team_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 5 lines
_______________________________________________
amd-gfx mailing listamd-gfx-PD4FTy7X32lNgt0PjOBp934avgP/[email protected]://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CAHbf0-FB2GV18igVo-8MHcVGL89KZoXn+O2B4asoe5R4RbgCVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
It's trivial to add the metadata/version headers to the existing firmware, so that is not an issue. The issue is with the firmware itself. If we used the existing firmware, we'd have to add a bunch of really ugly hacks in the driver to work around the current limitations.
Alex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Mike Lothian <[email protected]>
Sent: Monday, October 8, 2018 8:16:01 AM
To: Koenig, Christian
Cc: Mauro Rossi; Wentland, Harry; [email protected]
Subject: Re: [RFC] drm/amd/display: add SI support to AMD DC
I thought it just required the existing firmware, with padding / extra info put around it?
On Mon, 8 Oct 2018 at 12:29 Christian König <[email protected]<mailto:[email protected]>> wrote:
UVD/VCE on SI with amdgpu would need new firmware.
And so far we never had time to actually look into releasing that firmware.
Regards,
Christian.
Am 08.10.2018 um 13:22 schrieb Mauro Rossi:
Hi Mike,
On Mon, Oct 8, 2018 at 1:00 PM Mike Lothian <[email protected]<mailto:[email protected]>> wrote:
Hi Mauro
Do you know if there are any plans to add in UVD support on SI too?
Thanks
Mike
At the moment my focus is on getting a conformant, working and stable implementation of Atomic Display Framework, with the objective to have it upstreamed to amd-gfx branch, then staging (drm-next) and maybe merged in linux kernel.
To be honest my attempt is based on code paths inspection and mimicking,
so in this moment I do not even know the state of UVD and what changes are needed, but, based on what I saw for DCE6 support addition on top of DCE8,
covering all compatible HW modules makes a lot of sense and it is an opportunity to exploit, if feasible.
For this to happen in most complete and reliable way the feedback of staff who worked on DAL/DC will be essential, because what I did now was to adapt code for DCE8 to work for DCE6,
but it was like an "optimistic monkey with a keyboard" approach, with all due respect for monkeys with keyboards, :-) I may have missed dozen of changes.
Mauro
On Mon, 8 Oct 2018 at 03:24 Mauro Rossi <[email protected]<mailto:[email protected]>> wrote:
[PATCH 01/10] drm/amd/display: add asics info for SI parts
[PATCH 02/10] drm/amd/display: dc/dce: add DCE6 support
[PATCH 03/10] drm/amd/display: dc/core: add DCE6 support
[PATCH 04/10] drm/amd/display: dc/bios: add support for DCE6
[PATCH 05/10] drm/amd/display: dc/gpio: add support for DCE6
[PATCH 06/10] drm/amd/display: dc/i2caux: add support for DCE6
[PATCH 07/10] drm/amd/display: dc/irq: add support for DCE6
[PATCH 08/10] drm/amd/display: amdgpu_dm: add SI support
[PATCH 09/10] drm/amdgpu: enable DC support for SI parts
[PATCH 10/10] drm/amd/display: enable SI support in the Kconfig
The series adds preliminar SI support as a Proof Of Concept, based on the idea that DCE6 is similar to DCE8, to be reviewed and refined
Android-x86 need/motivation lies in the following chain of dependencies:
Vulkan radv requires gbm gralloc prime_fd support,
gbm gralloc requires drm hwcomposer,
drm hwcomposer requires Atomic Display Framework,
Atomic Display Framework requires AMD DC, currently not supporting SI.
So the goals are:
1) to get Vulkan radv working on SI parts for android-x86.
2) to remove the gap in SI (GCN 1st gen) not having atomic support.
DCE6 specific code was implemented as a replica of existing DCE8 support and based on how DCE8 specific code was added on top of DCE10,11 support by adding dce60* sources, functions, macros for each existing in dce80*
CONFIG_DRM_AMD_DC_SI parameter has been added to control SI support in DC
During this first iteration of review, there are aspects to verify:
- dce60 code has been added mechanically, so there may be redundancies and space for refactoring part of the code
- dce60_resources was having too many building errors due to missing DCE6 macros in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
- gfx6 may require some ad hoc initialization, skipped for the moment
- Hainan specific code requires review, as some documentation and code paths seem to point that famility may not have DCE6, please confirm
- video decoding blocks code have not been touched
- dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
- dc/dce/dce_dmcu.{c,h} may be missing some SI/DCE6 specifics
- dc/dce/dce_hwseq.h may be missing some SI/DCE6 specifics
- dc/dce/dce_link_encoder.h may be missing some SI/DCE6 specifics
- dc/dce/dce_stream_encoder.h may be missing some SI/DCE6 specifics
- dc/amdgpu_dm/* changes may be incomplete
- Any other omissis to be reviewed
- Feedback on best testing strategy required
Review from an expert of the DC impacted modules is recommended
SW Layer
/===============================================================\
| DC Display Timing Mode Asic | | Interface Service Service Manager Capability* | | | | Display Topology Display Link Adapter | | Path Manager Capability Service Service | | Service | |---------------------------------------------------------------| | GPIO* IRQ I2cAux HW BIOS | | Service** Manager* Sequencer* Parser* | | | | Connector Encoder Audio GPU Controller | | |
\===============================================================/
HW Layer
Legend:
*dce60 support was added cleanly with dce_6_0_{d,sh_mask}.h headers **dce60 support was added using dce_8_0_{d,sh_mask}.h headers
Android-x86 preliminary tests results:
[Boots with drm gralloc]
3DMark Slingshot
GFXbench OpenGLES benchmarks OK
V1 GPU benchmark (OpenGLES) OK
Regression in Google Chrome, Youtube (app does not show up) Regression in Olympus Rising, Chicken Invaders (app does not show up)
[Boots with drm hwcomposer + gbm gralloc]
Google Chrome, Youtube are OK
Vulkan radv HAL API becomes available with hwc+gbm gralloc V1 GPU benchmark (Vulkan API) OK
Sacha Willems examples OK
Some glitch/freeze in 3DMark Slingshot Extreeme and API overhead
Kind regards
Mauro Rossi
android-x86 team
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
I am currently testing your patch set, on amd-staging-drm-next (380d480842d584278dba9aa74341017d8c7d8c23) with an AMD tahiti xt part and a displayport monitor.
patch02 drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c did not apply but seems kind of benign.
It's working out of the box on my AMD tahiti xt part. I did not manage to break it with aggressive mode programming. Let's see how it goes with my everday usage.
Quoted 2 lines
The series adds preliminar SI support as a Proof Of Concept, based on the idea that DCE6 is similar to DCE8, to be reviewed and refined
Did want to do it, but did drop it due to DC code getting fixed with too much changes.
Brutally mapping DCE6 to DCE8 is an act of faith... and it's working on my part.
Quoted 8 lines
Android-x86 need/motivation lies in the following chain of dependencies:
Vulkan radv requires gbm grallocprime_fdsupport,
gbm gralloc requires drm hwcomposer,
drm hwcomposer requires Atomic Display Framework,
Atomic Display Framework requires AMD DC, currently not supporting SI.So the goals are:
1) to get Vulkan radv working on SI parts for android-x86.
AFAIK, Vulkan support is not dependent on the display block. I am running heavy vulkan games on a custom gnu/linux x86_64 AMD hardware based system, then the hwcomposer is android only?
Quoted 1 line
2) to remove the gap in SI (GCN 1st gen) not having atomic support.
I was nearly sure that atomic support was implicitely added for parts supporting only legacy DRM mode programming interfaces?
Signature · 5 lines
Sylvain _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 3 lines · On Mon, Oct 08, 2018 at 12:04:23PM +0000, [email protected] wrote:
I am currently testing your patch set, on amd-staging-drm-next (
380d480842d584278dba9aa74341017d8c7d8c23) with an AMD tahiti xt part and a displayport monitor.
Forgot a very important thing: I run it with the linux tsc fix, or all linux timings will be wrong and no displayport programing will happen. This fix is not in current vanilla amd-staging-drm-next.
Signature · 5 lines
Sylvain _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Sylvain,
Quoted 10 lines · On Mon, Oct 8, 2018 at 2:04 PM <[email protected]> wrote:
I am currently testing your patch set, on amd-staging-drm-next (
380d480842d584278dba9aa74341017d8c7d8c23) with an AMD tahiti xt part and a displayport monitor.
patch02drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.cdid not apply but seems kind of benign.It's working out of the box on my AMD tahiti xt part. I did not manage to break it with aggressive mode programming. Let's see how it goes with my everday usage.
Thanks for info, do you have some github or patch to share for comparison/mutual knowledge?
Quoted 8 lines
Quoted 3 lines
The series adds preliminar SI support as a Proof Of Concept, based on the idea that DCE6 is similar to DCE8, to be reviewed and refined
Did want to do it, but did drop it due to DC code getting fixed with too much changes.
Brutally mapping DCE6 to DCE8 is an act of faith... and it's working on my part.
Do you mean just pretending SI/DCE6 parts were belonging to CIK/DCE8 family? That was a doubt for me, because GCN 2nd Generation additions were:
FreeSync support (which should be missing in SI/GCN 1st generation), AMD TrueAudio (not sure about impacts in DC),
A revised version of AMD PowerTune technology (less states in GCN 1st gen), GCN 2nd generation introduced an entity called "Shader Engine"
While implementing the DCE6 code paths with 'systematic conservative approach' I have started to check how/if extend the approach to dce60/resources and dce60/irq,
I'd like to know if to push further in that direction or if keep the DCE8 headers/masks "hack"
One problem I see are Mosaic Colored Artifacts on screen surface in the 3D renders of 3Dmark Slingshot Extreeme,
another visual problem is some imperfection of video sync/buffer swaps with drm_hwcomposer stack, same as per other GCN families.
It will be interesting to launch some conformance tool like Piglit on linux, Android CTS dEQP VK tests,
but after having triaged/removed most of the current drm gralloc regressions.
Mauro
Quoted 8 lines
Quoted 8 lines
Android-x86 need/motivation lies in the following chain of dependencies:
Vulkan radv requires gbm grallocprime_fdsupport,
gbm gralloc requires drm hwcomposer,
drm hwcomposer requires Atomic Display Framework,
Atomic Display Framework requires AMD DC, currently not supporting SI.
Quoted 6 lines
Quoted 2 lines
So the goals are:
1) to get Vulkan radv working on SI parts for android-x86.AFAIK, Vulkan support is not dependent on the display block. I am running heavy vulkan games on a custom gnu/linux
x86_64AMD hardware based system, then the hwcomposer is android only?
Yes, at the moment drm_hwcomposer is used only in Android builds
Quoted 5 lines
Quoted 2 lines
2) to remove the gap in SI (GCN 1st gen) not having atomic support.
I was nearly sure that atomic support was implicitely added for parts supporting only legacy DRM mode programming interfaces?
drm_hwcomposer API does not see atomic properties with amdgpu on SI parts. if Atomic Display Framework available in amdgpu, then hwc, gbm gralloc and radv would be already working on Android.
Also radeondrmfb does not support Atomic Display Framework and that is a problem to have one stack for all drivers, becase with AMD DC, radeon r5xx... r7xx parts will not
work even if OpenGLES supported.
Mauro
Quoted 4 lines
--
Sylvain
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CAEQFVGahx4U+52uKu20_q0iCPrdzeW8G+viS7p2LJtgF61bf6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 2 lines · Mauro Rossi
Thanks for info, do you have some github or patch to share for comparison/mutual knowledge?
Sorry, I was wrong: I thought your patch set was enabling by default DC for dce6 (it requires the DC kernel param).
I did force it, and it fails to init the dce6.
:(
Signature · 5 lines
Sylvain _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 3 lines · On Mon, Oct 08, 2018 at 08:17:06PM +0000, [email protected] wrote:
Sorry, I was wrong: I thought your patch set was enabling by default DC for dce6 (it requires the DC kernel param).
I did force it, and it fails to init the dce6.
I did hack a bit your patch set on amd-staging-drm-next to make it go through the asic init and I managed to get a x11 display with lines kind of garbled, but you can still understand easily what's on the screen.
I checked the kernel log, and like you said, I got errors in DM_PPLIB due to an invalid powerlevel and atombios/vbios table parsing regarding connectors.
It _seems_ there is not that much additional work to do in order to make it properly work.
That said, since I am not an android linux dev, I cannot really understand why the current dce6 implementation in amdgpu is a pb.
AFAIK, the real thing that you additionally get with DC is freesync. But freesync is actually going to be interesting only if displays are able to get their sync range lower bound to 0, and get significant power saving thanks to this. For the use case of very low display refresh rate I don't even think displayport or hdmi can do that, and be power friendly (you would have to retrain the link probably each time you send a framebuffer to the display).
I don't know what are the features you have in atomic mode setting and not in legacy mode setting? You are just setting the same video mode in 2 different ways.
Signature · 5 lines
Sylvain _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi,
reporting about some progress made during the weekend, thanks to Sylvain feedback & suggestions.
I have rebased and updated the series on top of
https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-next
Here is the amd_dc_si branch:
https://github.com/maurossi/linux/tree/amd_dc_si (uploading)
NOTE: arch/x86/kernel/tsc.c changes for 4K display modes are not there, as they are not strictly needed for amd-gfx
Copying also Harry, Alex, Christian and Mike in order to get some objective and infallible
clues/feedbacks about blocking points and about "no care" items.
Please, also big things I may have missed.
M.
Quoted 5 lines · On Mon, Oct 8, 2018 at 11:23 PM <[email protected]> wrote:
Sylvain - I did hack a bit your patch set on amd-staging-drm-next to make it go through the asic init and I managed to get a x11 display with lines kind of garbled, but you can still understand easily what's on the screen.
I forgot to mention that since I'm gorgeously trying AMD DC also on Mullins I have reverted d9fda24 (""drm/amdgpu: Don't default to DC support for Kaveri and older")
because on Mullins I can boot with HDMI and HDMI-to-VGA converter
I was hoping for AMD DC being re-enabled for Kaveri and older, but I'm available to submit new version of specific patch if required.
Quoted 4 lines
Sylvain - ... The lines may be garbled in your driver code because, if I recall properly, "line buffer" programing in dce8 is not
the same than in dce6 (look for registers with the "LB" abbreviation). Or some slight differences in frame buffer tiling.
So the problem could be related to some kind of scan line or tiling buffer issue,
at the moment the dce_resouces model is grabbed "AS IS" from DCE8 registers/masks
Quoted 6 lines
Sylvain - I checked the kernel log, and like you said, I got errors in
DM_PPLIBdue to an invalid powerlevel and atombios/vbios table parsing regarding connectors. general dpm is in amdgpu(no DC) for SI, it means the DCE related dpm part in current SI amdgpu code path should be "copied" in DC. It is related very probably to the parsing of VBIOS/ATOMBIOS tables.
10-09 21:10:14.427 0 0 E :
[drm:dm_pp_get_static_clocks [amdgpu]] *ERROR* DM_PPLIB: invalid powerlevel state: 0!
NOTE: the error is the result of Powerplay dependency introduced by using AMD DC for SI
it's not fatal and it does not seem to affect performance in the Benchmarks
DOUBT: I think that it would make sense to set "power level 0" i.e. the "lower state" as safe default,
considering that powerplay smu6/hwmgr are not implemented for SI and smu7 CIK functions do not work,
the AS-IS dpm is the only available option. (and it seams to be working, looking at the framerates 250-280 in the V1 Vulkan benchmark)
Quoted 2 lines
10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4! 10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4!
NOTE: the warning also appears with Tonga and Vega, it is a Warning and does not seem to cause issues, so I would assume there is a default treatment in place,
is this related to missing encoder for drm crtc or to other kind of encoder?
Quoted 3 lines
Sylvain - Did add SI handling in some raven firmware loader function. In
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c, "load_dmcu_fw" function augmented with SI chipasic_type.
I've merged the change in the (v2) branch
https://github.com/maurossi/linux/tree/amd_dc_si
Quoted 6 lines
Sylvain - AFAIK, the real thing that you additionally get with DC is freesync. But freesync is actually going to be interesting only if displays are able to get their sync range lower bound to 0, and get significant power saving thanks to this. For the use case of very low display refresh rate I don't even think displayport or hdmi can do that, and be power friendly (you would have to retrain the link probably each time you send a framebuffer to the display).
If freesync is about reducing the framerate rate for power saving, provided that I've seen it be mentioned the first time for GCN 2nd generation, I'm not expecting freesync as a mandatory capability for the series.
Quoted 3 lines
Mauro --
dce60_resourceswas having too many building errors due to missing DCE6 macros in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
Still to many building errors due to quite different registers naming, pointers to GPU register info (either in GPUopen or by means of listing the DCE6 vs DC8 differences),
or keeping the DCE6 is exactly like DCE8 as register changes are apparently not mission critical.
Quoted 2 lines
Mauro - dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
I could not update dc/irq VBI Vertical Blank Interrupt, because i cannot find the corresponding IRQ register in amdgpu/dce6 registers headers/mask
-CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK +?seems trivial but who knows what is the corresponding in DCE6?
-CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_CLEAR_MASK +?seems trivial but who knows what is the corresponding in DCE6?
NOTE: If this is the very basic VBI Vertical Blank Interrupt signal handling, there should be dce6 registers/masks,
but some hint/documentation is necessary for me to find them.
Quoted 1 line
Mauro - gfx6 may require some ad hoc initialization, skipped for the moment
Are there ad hoc tiling settings which are necessary?
The OpenGLES and Vulkan radv apps I've tested:
Android CTS dEQP-VK only 85 tests failed over 220'000 Toy Zombies Lite
Sky Force Reloaded
V1 Benchmark Pro
GFXbench
Antutu 3D
Various OpenGLES demos
Here I'm planning to perform also dEQP-EGL, dEQP-GLES2, dEQP-GLES3 soon, but feedbacks from developers are very welcome and appreciated
Quoted 2 lines
Mauro - Hainan specific code requires review, as some documentation and code paths seem to point that famility may not have DCE6, please confirm
Hainan specifics were removed and are unsupported in the new serie as DCE6 physical module not available in Hainan parts. Unless the virtual_dce modules supports atomit, but I don't think so.
Quoted 1 line
Mauro - video decoding blocks code have not been touched
UVD and VCE firmwares and code changes for SI were necessary before the series and they are unrelated to AMD DC for SI patches.
Quoted 1 line
Mauro - dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
In amd-staging-drm-next dce_clock_source is generic, SI specifics are not necessary anymore.
Quoted 3 lines
Sylvain - It _seems_ there is not that much additional work to do in order to make it properly work.
Ok, let's keep the momentum and continue tackle with x11 display problem and after that I'm runnign piglit no regression with x11 and with wayland too.
Quoted 1 line
Testing on x11,wayland or other ways
Any other testing tools worth a run?
In case there is some AMD/GPUopen testing tool with unit tests, please let me know
Kind regards
Mauro
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CAEQFVGaErupy3y+sKA+uqQPn7x0oL1T9BKWj6y8EC12Ap2-YDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 6 lines · Mauro Rossi
DOUBT: I think that it would make sense to set "power level 0" i.e. the "lower state" as safe default,
considering that powerplay smu6/hwmgr are not implemented for SI and smu7 CIK functions do not work,
the AS-IS dpm is the only available option. (and it seams to be working, looking at the framerates 250-280 in the V1 Vulkan benchmark)
dpm not implemented for SI? Are you sure? Because I recall passing "messages" to the smu6 to switch between major power modes. And currently in amdgpu I switch back and forth between "high" and "auto". And if I stay on "high" my GPU fans are going crazy all the time, which forces me to switch back to "auto" in order to quiet the fans.
Any major state change for any block would have to go through the dpm block (smu), because it has to be accounted by this block for proper operation. One of the hard thing to code, coze no proper documentation, was to set the blocks in an initial state from a poweron/hard reset/etc which the dpm will know how to start/catch-up its operations from. In a perfect world, the dpm block would have the knowledge on how to program any block in an initial working state from any unknown state (and in case of hard block hang, would know how to hard reset it and set it in a initial state).
Quoted 3 lines
If freesync is about reducing the framerate rate for power saving, provided that I've seen it be mentioned the first time for GCN 2nd generation, I'm not expecting freesync as a mandatory capability for the series.
Well, there are the low FPS games, and the movies. I am a regular gamer, and I know that sustained 60 fps is the very lower bound for many games on a desktop computer display.
It does not apply to mobile size display, and "couch playing" on a TV. The readibilty of the game depends directly on the amplitude of movements in physical distance on the display, their speed, the viewing distance, and the FPS. From my personal comfort point of view and types of games I play, on a desktop display (dpi, typical viewing distance, typical size), I would target a minimum of 80-100 fps (120/144 fps seems to be "perfect" targets). Played rise of the tomb raider (vulkan) on my tahiti part, and even with a blur effect to "smooth" the perceived fps like in movies, sub-60 fps is really uncomfortable. I was about to stop playing to this game even though it is a rather "slow" video game.
Quoted 2 lines
In amd-staging-drm-next
dce_clock_sourceis generic, SI specifics are not necessary anymore.
If I recall properly, "bandwidths" and "watermarks" calcs had asic generations specific code paths. bandwidth is important for displayport programming or maybe you can presume the maximum all the time (and sacrifice some unkown amount of power) and watermarks, I know in my old driver I was giving the highest priority the the dce block anyway (something related to a "memory aribtrer" and "line buffer").
Quoted 1 line
Any other testing tools worth a run?
AAA games (vulkan: rize of the tomb raider, GL:bioshock infinite) and AAAA games (dota2(gl and vulkan), cs:go...)
Signature · 5 lines
Sylvain _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Sylvain,
Il lun 15 ott 2018, 03:25 <[email protected]> ha scritto:
Quoted 11 lines · Mauro Rossi
Quoted 6 lines
DOUBT: I think that it would make sense to set "power level 0" i.e. the "lower state" as safe default,
considering that powerplay smu6/hwmgr are not implemented for SI and smu7 CIK functions do not work,
the AS-IS dpm is the only available option. (and it seams to be working, looking at the framerates 250-280 in the V1 Vulkan benchmark)dpm not implemented for SI? Are you sure? Because I recall passing "messages"
dpm for SI is available, while powerplay for SI is not, but display/amdgpu_dm uses some powerplay calls, where get_static_clock functions not available and the *ERROR* DM_PPLIB is due to missing handling in powerplay
to the smu6 to switch between major power modes. And currently in amdgpu I
Quoted 53 lines
switch back and forth between "high" and "auto". And if I stay on "high" my GPU
fans are going crazy all the time, which forces me to switch back to "auto" in
order to quiet the fans.
Any major state change for any block would have to go through the dpm block (smu), because it has to be accounted by this block for proper operation. One
of the hard thing to code, coze no proper documentation, was to set the blocks
in an initial state from a poweron/hard reset/etc which the dpm will know how to start/catch-up its operations from. In a perfect world, the dpm block
would have the knowledge on how to program any block in an initial working state from any unknown state (and in case of hard block hang, would know how to
hard reset it and set it in a initial state).Quoted 2 lines
If freesync is about reducing the framerate rate for power saving, provided that I've seen it be mentioned the first time for GCN 2nd
generation,
Quoted 1 line
I'm not expecting freesync as a mandatory capability for the series.
Well, there are the low FPS games, and the movies. I am a regular gamer, and I
know that sustained 60 fps is the very lower bound for many games on a desktop
computer display.
It does not apply to mobile size display, and "couch playing" on a TV. The readibilty of the game depends directly on the amplitude of movements in physical distance on the display, their speed, the viewing distance, and the
FPS. From my personal comfort point of view and types of games I play, on a desktop display (dpi, typical viewing distance, typical size), I would target a
minimum of 80-100 fps (120/144 fps seems to be "perfect" targets). Played rise of the tomb raider (vulkan) on my tahiti part, and even with a blur
effect to "smooth" the perceived fps like in movies, sub-60 fps is really uncomfortable. I was about to stop playing to this game even though it is a rather "slow" video game.Quoted 2 lines
In amd-staging-drm-next
dce_clock_sourceis generic, SI specifics are not necessary anymore.If I recall properly, "bandwidths" and "watermarks" calcs had asic generations
specific code paths. bandwidth is important for displayport programming or maybe you can presume the maximum all the time (and sacrifice some unkown amount of power) and watermarks, I know in my old driver I was giving the highest priority the the dce block anyway (something related to a "memory aribtrer" and "line buffer").
Quoted 9 lines
Quoted 1 line
Any other testing tools worth a run?
AAA games (vulkan: rize of the tomb raider, GL:bioshock infinite) and AAAA games
(dota2(gl and vulkan), cs:go...)--
Sylvain
Thanks a lot
Mauro
Quoted 1 line
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CAEQFVGbB_ezGSGwPu2Ka-4rY9RjB_rJvPL8ZCEG-_rfXxOEN-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 4 lines · Mauro Rossi
dpm for SI is available, while powerplay for SI is not, but display/amdgpu_dm uses some powerplay calls, where
get_static_clockfunctions not available and the *ERROR*DM_PPLIBis due to missing handling in powerplay
I though powerplay was just more power states for the dpm state machines to play with. I recall parsing ATOMBIOS pplay tables for records of (voltages/clocks frequencies).
Maybe the future is to trust the OS kernel and perform all "low speed" 3D asic functions there and keep only high speed 3D operations in the asic.
Signature · 5 lines
Sylvain _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
There are two sets of power management code in amdgpu, the older dpm code which was ported from radeon, and the newer powerplay code which was rewritten to align closer with the power management code for other OSes and the hw teams. The "powerplay" code has more features than the older dpm code, but at a fundamental level, they are pretty much the same. Both use the same SMU interfaces to support dynamic clock switching. SI is a bit tricky because it uses and older version of the SMU and an older power management design so it doesn't really match cleanly with the current APIs in the "powerplay" code.
Alex
________________________________
From: [email protected] <[email protected]>
Sent: Monday, October 15, 2018 8:45 AM
To: Mauro Rossi
Cc: [email protected]; Wentland, Harry; Deucher, Alexander; Mike Lothian
Subject: Re: [RFC] drm/amd/display: add SI support to AMD DC
Quoted 4 lines · Mauro Rossi
dpm for SI is available, while powerplay for SI is not, but display/amdgpu_dm uses some powerplay calls, where
get_static_clockfunctions not available and the *ERROR*DM_PPLIBis due to missing handling in powerplay
I though powerplay was just more power states for the dpm state machines to play with. I recall parsing ATOMBIOS pplay tables for records of (voltages/clocks frequencies).
Maybe the future is to trust the OS kernel and perform all "low speed" 3D asic functions there and keep only high speed 3D operations in the asic.
--
Sylvain
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 26 lines · Mauro Rossi
Hi,
reporting about some progress made during the weekend, thanks to Sylvain feedback & suggestions.
I have rebased and updated the series on top of
https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-nextHere is the
amd_dc_sibranch:
https://github.com/maurossi/linux/tree/amd_dc_si (uploading)
NOTE:arch/x86/kernel/tsc.cchanges for 4K display modes are not there, as they are not strictly needed for amd-gfxCopying also Harry, Alex, Christian and Mike in order to get some objective and infallible
clues/feedbacks about blocking points and about "no care" items.Please, also big things I may have missed.
M.Quoted 5 lines · On Mon, Oct 8, 2018 at 11:23 PM <[email protected]> wrote:
Sylvain - I did hack a bit your patch set on amd-staging-drm-next to make it go through the asic init and I managed to get a x11 display with lines kind of garbled, but you can still understand easily what's on the screen.
Quoted 8 lines
I forgot to mention that since I'm gorgeously trying AMD DC also on Mullins I have reverted d9fda24 (""drm/amdgpu: Don't default to DC support for Kaveri and older")
because on Mullins I can boot with HDMI and HDMI-to-VGA converterI was hoping for AMD DC being re-enabled for Kaveri and older, but I'm available to submit new version of specific patch if required.
I still need to find time to get through your patchset properly. Just a quick note on this. There are Kabini/Kaveri ASICs with VGA connectors in the market, which the DC code doesn't support. If someone writes it we can re-enable it by default.
Either way, you can revert that patch for your tree or use amdgpu.dc=0 as long as you're aware that VGA won't work with amdgpu on such a kernel.
Harry
Quoted 130 lines
Quoted 4 lines
Sylvain - ... The lines may be garbled in your driver code because, if I recall properly, "line buffer" programing in dce8 is not
the same than in dce6 (look for registers with the "LB" abbreviation). Or some slight differences in frame buffer tiling.So the problem could be related to some kind of scan line or tiling buffer issue,
at the moment thedce_resoucesmodel is grabbed "AS IS" from DCE8 registers/masksQuoted 6 lines
Sylvain - I checked the kernel log, and like you said, I got errors in
DM_PPLIBdue to an invalid powerlevel and atombios/vbios table parsing regarding connectors. general dpm is in amdgpu(no DC) for SI, it means the DCE related dpm part in current SI amdgpu code path should be "copied" in DC. It is related very probably to the parsing of VBIOS/ATOMBIOS tables.10-09 21:10:14.427 0 0 E :
[drm:dm_pp_get_static_clocks [amdgpu]] *ERROR*DM_PPLIB: invalid powerlevel state: 0!NOTE: the error is the result of Powerplay dependency introduced by using AMD DC for SI
it's not fatal and it does not seem to affect performance in the BenchmarksDOUBT: I think that it would make sense to set "power level 0" i.e. the "lower state" as safe default,
considering that powerplay smu6/hwmgr are not implemented for SI and smu7 CIK functions do not work,
the AS-IS dpm is the only available option. (and it seams to be working, looking at the framerates 250-280 in the V1 Vulkan benchmark)Quoted 2 lines
10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4! 10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4!NOTE: the warning also appears with Tonga and Vega, it is a Warning and does not seem to cause issues, so I would assume there is a default treatment in place,
is this related to missing encoder for drm crtc or to other kind of encoder?Quoted 3 lines
Sylvain - Did add SI handling in some raven firmware loader function. In
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c, "load_dmcu_fw" function augmented with SI chipasic_type.I've merged the change in the (v2) branch
https://github.com/maurossi/linux/tree/amd_dc_siQuoted 6 lines
Sylvain - AFAIK, the real thing that you additionally get with DC is freesync. But freesync is actually going to be interesting only if displays are able to get their sync range lower bound to 0, and get significant power saving thanks to this. For the use case of very low display refresh rate I don't even think displayport or hdmi can do that, and be power friendly (you would have to retrain the link probably each time you send a framebuffer to the display).
If freesync is about reducing the framerate rate for power saving, provided that I've seen it be mentioned the first time for GCN 2nd generation, I'm not expecting freesync as a mandatory capability for the series.
Quoted 3 lines
Mauro --
dce60_resourceswas having too many building errors due to missing DCE6 macros in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoCStill to many building errors due to quite different registers naming, pointers to GPU register info (either in GPUopen or by means of listing the DCE6 vs DC8 differences),
or keeping the DCE6 is exactly like DCE8 as register changes are apparently not mission critical.Quoted 2 lines
Mauro - dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
I could not update dc/irq VBI Vertical Blank Interrupt, because i cannot find the corresponding IRQ register in amdgpu/dce6 registers headers/mask
(quoted diff) +2
-2-CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK +?seems trivial but who knows what is the corresponding in DCE6? -CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_CLEAR_MASK +?seems trivial but who knows what is the corresponding in DCE6?NOTE: If this is the very basic VBI Vertical Blank Interrupt signal handling, there should be dce6 registers/masks,
but some hint/documentation is necessary for me to find them.Quoted 1 line
Mauro - gfx6 may require some ad hoc initialization, skipped for the moment
Are there ad hoc tiling settings which are necessary?
The OpenGLES and Vulkan radv apps I've tested:
Android CTS dEQP-VK only 85 tests failed over 220'000 Toy Zombies Lite
Sky Force Reloaded
V1 Benchmark Pro
GFXbench
Antutu 3D
Various OpenGLES demosHere I'm planning to perform also dEQP-EGL, dEQP-GLES2, dEQP-GLES3 soon, but feedbacks from developers are very welcome and appreciated
Quoted 2 lines
Mauro - Hainan specific code requires review, as some documentation and code paths seem to point that famility may not have DCE6, please confirm
Hainan specifics were removed and are unsupported in the new serie as DCE6 physical module not available in Hainan parts. Unless the
virtual_dcemodules supports atomit, but I don't think so.Quoted 1 line
Mauro - video decoding blocks code have not been touched
UVD and VCE firmwares and code changes for SI were necessary before the series and they are unrelated to AMD DC for SI patches.
Quoted 1 line
Mauro - dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
In amd-staging-drm-next
dce_clock_sourceis generic, SI specifics are not necessary anymore.Quoted 3 lines
Sylvain - It _seems_ there is not that much additional work to do in order to make it properly work.
Ok, let's keep the momentum and continue tackle with x11 display problem and after that I'm runnign piglit no regression with x11 and with wayland too.
Quoted 9 lines
Quoted 1 line
Testing on x11,wayland or other ways
Any other testing tools worth a run?
In case there is some AMD/GPUopen testing tool with unit tests, please let me know
Kind regardsMauro
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): bef5787e-cc8d-df35-dc55-353ed4443a8c-5C7GfCeVMHo@public.gmane.org
Quoted 6 lines · Harry Wentland
Quoted 5 lines · Mauro Rossi
Hi,
reporting about some progress made during the weekend, thanks to Sylvain feedback & suggestions.
Quoted 7 lines
Quoted 7 lines
I have rebased and updated the series on top of
https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-nextQuoted 1 line
Quoted 1 line
Here is the
amd_dc_sibranch:https://github.com/maurossi/linux/tree/amd_dc_si (uploading)
NOTE:arch/x86/kernel/tsc.cchanges for 4K display modes are not there, as they are not strictly needed for amd-gfx
What updates do you have to your original series?
If there are substantial updates can you send a v2 of your series?
If not I'll go through the v1. The branch is great for review but email patches are easier for commenting.
Quoted 22 lines
Quoted 13 lines
Copying also Harry, Alex, Christian and Mike in order to get some objective and infallible
clues/feedbacks about blocking points and about "no care" items.Please, also big things I may have missed.
M.Quoted 5 lines · On Mon, Oct 8, 2018 at 11:23 PM <[email protected]> wrote:
Sylvain - I did hack a bit your patch set on amd-staging-drm-next to make it go through the asic init and I managed to get a x11 display with lines kind of garbled, but you can still understand easily what's on the screen.
Quoted 8 lines
I forgot to mention that since I'm gorgeously trying AMD DC also on Mullins I have reverted d9fda24 (""drm/amdgpu: Don't default to DC support for Kaveri and older")
because on Mullins I can boot with HDMI and HDMI-to-VGA converterI was hoping for AMD DC being re-enabled for Kaveri and older, but I'm available to submit new version of specific patch if required.
Quoted 16 lines
I still need to find time to get through your patchset properly. Just a quick note on this. There are Kabini/Kaveri ASICs with VGA connectors in the market, which the DC code doesn't support. If someone writes it we can re-enable it by default.
Either way, you can revert that patch for your tree or use amdgpu.dc=0 as long as you're aware that VGA won't work with amdgpu on such a kernel.
Harry
Quoted 10 lines
Quoted 4 lines
Sylvain - ... The lines may be garbled in your driver code because, if I recall properly, "line buffer" programing in dce8 is not
the same than in dce6 (look for registers with the "LB" abbreviation). Or some slight differences in frame buffer tiling.So the problem could be related to some kind of scan line or tiling buffer issue,
at the moment thedce_resoucesmodel is grabbed "AS IS" from DCE8 registers/masks
We should probably update the DCE6 headers and use those. Sometimes register addresses change in subtle ways and cause problems later on that are hard to spot.
Quoted 15 lines
Quoted 15 lines
Quoted 6 lines
Sylvain - I checked the kernel log, and like you said, I got errors in
DM_PPLIBdue to an invalid powerlevel and atombios/vbios table parsing regarding connectors. general dpm is in amdgpu(no DC) for SI, it means the DCE related dpm part in current SI amdgpu code path should be "copied" in DC. It is related very probably to the parsing of VBIOS/ATOMBIOS tables.10-09 21:10:14.427 0 0 E :
[drm:dm_pp_get_static_clocks [amdgpu]] *ERROR*DM_PPLIB: invalid powerlevel state: 0!NOTE: the error is the result of Powerplay dependency introduced by using AMD DC for SI
it's not fatal and it does not seem to affect performance in the Benchmarks
Quoted 7 lines
Quoted 7 lines
DOUBT: I think that it would make sense to set "power level 0" i.e. the "lower state" as safe default,
considering that powerplay smu6/hwmgr are not implemented for SI and smu7 CIK functions do not work,
the AS-IS dpm is the only available option. (and it seams to be working, looking at the framerates 250-280 in the V1 Vulkan benchmark)
I wouldn't worry about this too much for now. DC really just wants powerplay. Might make sense to just silence the error print if things seem to work otherwise.
Great work in getting things up and running with DCE6 and thanks for sending patches to get this work upstreamed.
Harry
Quoted 105 lines
Quoted 105 lines
Quoted 4 lines
10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4! 10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4!NOTE: the warning also appears with Tonga and Vega, it is a Warning and does not seem to cause issues, so I would assume there is a default treatment in place,
is this related to missing encoder for drm crtc or to other kind of encoder?Quoted 3 lines
Sylvain - Did add SI handling in some raven firmware loader function. In
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c, "load_dmcu_fw" function augmented with SI chipasic_type.I've merged the change in the (v2) branch
https://github.com/maurossi/linux/tree/amd_dc_siQuoted 6 lines
Sylvain - AFAIK, the real thing that you additionally get with DC is freesync. But freesync is actually going to be interesting only if displays are able to get their sync range lower bound to 0, and get significant power saving thanks to this. For the use case of very low display refresh rate I don't even think displayport or hdmi can do that, and be power friendly (you would have to retrain the link probably each time you send a framebuffer to the display).
If freesync is about reducing the framerate rate for power saving, provided that I've seen it be mentioned the first time for GCN 2nd generation, I'm not expecting freesync as a mandatory capability for the series.
Quoted 3 lines
Mauro --
dce60_resourceswas having too many building errors due to missing DCE6 macros in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoCStill to many building errors due to quite different registers naming, pointers to GPU register info (either in GPUopen or by means of listing the DCE6 vs DC8 differences),
or keeping the DCE6 is exactly like DCE8 as register changes are apparently not mission critical.Quoted 2 lines
Mauro - dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
I could not update dc/irq VBI Vertical Blank Interrupt, because i cannot find the corresponding IRQ register in amdgpu/dce6 registers headers/mask
(quoted diff) +2
-2-CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK +?seems trivial but who knows what is the corresponding in DCE6? -CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_CLEAR_MASK +?seems trivial but who knows what is the corresponding in DCE6?NOTE: If this is the very basic VBI Vertical Blank Interrupt signal handling, there should be dce6 registers/masks,
but some hint/documentation is necessary for me to find them.Quoted 1 line
Mauro - gfx6 may require some ad hoc initialization, skipped for the moment
Are there ad hoc tiling settings which are necessary?
The OpenGLES and Vulkan radv apps I've tested:
Android CTS dEQP-VK only 85 tests failed over 220'000 Toy Zombies Lite
Sky Force Reloaded
V1 Benchmark Pro
GFXbench
Antutu 3D
Various OpenGLES demosHere I'm planning to perform also dEQP-EGL, dEQP-GLES2, dEQP-GLES3 soon, but feedbacks from developers are very welcome and appreciated
Quoted 2 lines
Mauro - Hainan specific code requires review, as some documentation and code paths seem to point that famility may not have DCE6, please confirm
Hainan specifics were removed and are unsupported in the new serie as DCE6 physical module not available in Hainan parts. Unless the
virtual_dcemodules supports atomit, but I don't think so.Quoted 1 line
Mauro - video decoding blocks code have not been touched
UVD and VCE firmwares and code changes for SI were necessary before the series and they are unrelated to AMD DC for SI patches.
Quoted 1 line
Mauro - dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
In amd-staging-drm-next
dce_clock_sourceis generic, SI specifics are not necessary anymore.Quoted 3 lines
Sylvain - It _seems_ there is not that much additional work to do in order to make it properly work.
Ok, let's keep the momentum and continue tackle with x11 display problem and after that I'm runnign piglit no regression with x11 and with wayland too.
Quoted 1 line
Testing on x11,wayland or other ways
Any other testing tools worth a run?
In case there is some AMD/GPUopen testing tool with unit tests, please let me know
Kind regards
Quoted 7 lines
Quoted 2 lines
Mauro
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 70b01042-3210-dcce-2b9a-a16754db9f10-5C7GfCeVMHo@public.gmane.org
Hi Harry,
thanks a lot for response,
Quoted 17 lines · Harry Wentland
Quoted 6 lines · Harry Wentland
Quoted 5 lines · Mauro Rossi
Hi,
reporting about some progress made during the weekend, thanks to Sylvain feedback & suggestions.
Quoted 7 lines
Quoted 7 lines
I have rebased and updated the series on top of
https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-nextQuoted 1 line
Quoted 1 line
Here is the
amd_dc_sibranch:https://github.com/maurossi/linux/tree/amd_dc_si (uploading)
NOTE:arch/x86/kernel/tsc.cchanges for 4K display modes are not there, as they are not strictly needed for amd-gfx
Quoted 3 lines
What updates do you have to your original series?
If there are substantial updates can you send a v2 of your series?
The new v2 series is rebased on amd-staging-drm-next with following benefits:
- dce_clocks chipset families cases are not required anymore
- dcmu fw load for DCN1 has some SI cases added
- it is ready to be applied in amd-staging-drm-next
Not much changes compared to v1, but I'm about to submit v2 very soon.
Quoted 2 lines
If not I'll go through the v1. The branch is great for review but email patches are easier for commenting.
This morning I've launched a build on v2 series, on amd-staging-drm-next branch rebased on top of 4.19rc8 just to test it builds fine.
I'm sending the v2 series this evening and review may proceed on v2 amd-staging-drm-next context.
Mauro
Quoted 66 lines
Quoted 24 lines
Quoted 15 lines
Copying also Harry, Alex, Christian and Mike in order to get some objective and infallible
clues/feedbacks about blocking points and about "no care" items.Please, also big things I may have missed.
M.Quoted 5 lines · On Mon, Oct 8, 2018 at 11:23 PM <[email protected]> wrote:
Sylvain - I did hack a bit your patch set on amd-staging-drm-next to make it go through the asic init and I managed to get a x11 display with lines kind of garbled, but you can still understand easily what's on the screen.
Quoted 8 lines
I forgot to mention that since I'm gorgeously trying AMD DC also on Mullins I have reverted d9fda24 (""drm/amdgpu: Don't default to DC support for Kaveri and older")
because on Mullins I can boot with HDMI and HDMI-to-VGA converterI was hoping for AMD DC being re-enabled for Kaveri and older, but I'm available to submit new version of specific patch if required.
Quoted 16 lines
I still need to find time to get through your patchset properly. Just a quick note on this. There are Kabini/Kaveri ASICs with VGA connectors in the market, which the DC code doesn't support. If someone writes it we can re-enable it by default.
Either way, you can revert that patch for your tree or use amdgpu.dc=0 as long as you're aware that VGA won't work with amdgpu on such a kernel.
Harry
Quoted 10 lines
Quoted 4 lines
Sylvain - ... The lines may be garbled in your driver code because, if I recall properly, "line buffer" programing in dce8 is not
the same than in dce6 (look for registers with the "LB" abbreviation). Or some slight differences in frame buffer tiling.So the problem could be related to some kind of scan line or tiling buffer issue,
at the moment thedce_resoucesmodel is grabbed "AS IS" from DCE8 registers/masksWe should probably update the DCE6 headers and use those. Sometimes register addresses change in subtle ways and cause problems later on that are hard to spot.
Quoted 15 lines
Quoted 15 lines
Quoted 6 lines
Sylvain - I checked the kernel log, and like you said, I got errors in
DM_PPLIBdue to an invalid powerlevel and atombios/vbios table parsing regarding connectors. general dpm is in amdgpu(no DC) for SI, it means the DCE related dpm part in current SI amdgpu code path should be "copied" in DC. It is related very probably to the parsing of VBIOS/ATOMBIOS tables.10-09 21:10:14.427 0 0 E :
[drm:dm_pp_get_static_clocks [amdgpu]] *ERROR*DM_PPLIB: invalid powerlevel state: 0!NOTE: the error is the result of Powerplay dependency introduced by using AMD DC for SI
it's not fatal and it does not seem to affect performance in the BenchmarksQuoted 7 lines
Quoted 7 lines
DOUBT: I think that it would make sense to set "power level 0" i.e. the "lower state" as safe default,
considering that powerplay smu6/hwmgr are not implemented for SI and smu7 CIK functions do not work,
the AS-IS dpm is the only available option. (and it seams to be working, looking at the framerates 250-280 in the V1 Vulkan benchmark)
Quoted 118 lines
I wouldn't worry about this too much for now. DC really just wants powerplay. Might make sense to just silence the error print if things seem to work otherwise.
Great work in getting things up and running with DCE6 and thanks for sending patches to get this work upstreamed.
Harry
Quoted 112 lines
Quoted 98 lines
Quoted 4 lines
10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4! 10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4!NOTE: the warning also appears with Tonga and Vega, it is a Warning and does not seem to cause issues, so I would assume there is a default treatment in place,
is this related to missing encoder for drm crtc or to other kind of encoder?Quoted 3 lines
Sylvain - Did add SI handling in some raven firmware loader function. In
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c, "load_dmcu_fw" function augmented with SI chipasic_type.I've merged the change in the (v2) branch
https://github.com/maurossi/linux/tree/amd_dc_siQuoted 6 lines
Sylvain - AFAIK, the real thing that you additionally get with DC is freesync. But freesync is actually going to be interesting only if displays are able to get their sync range lower bound to 0, and get significant power saving thanks to this. For the use case of very low display refresh rate I don't even think displayport or hdmi can do that, and be power friendly (you would have to retrain the link probably each time you send a framebuffer to the display).
If freesync is about reducing the framerate rate for power saving, provided that I've seen it be mentioned the first time for GCN 2nd generation, I'm not expecting freesync as a mandatory capability for the series.
Quoted 3 lines
Mauro --
dce60_resourceswas having too many building errors due to missing DCE6 macros in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoCStill to many building errors due to quite different registers naming, pointers to GPU register info (either in GPUopen or by means of listing the DCE6 vs DC8 differences),
or keeping the DCE6 is exactly like DCE8 as register changes are apparently not mission critical.Quoted 2 lines
Mauro - dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
I could not update dc/irq VBI Vertical Blank Interrupt, because i cannot find the corresponding IRQ register in amdgpu/dce6 registers headers/mask
(quoted diff) +2
-2-CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK +?seems trivial but who knows what is the corresponding in DCE6? -CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_CLEAR_MASK +?seems trivial but who knows what is the corresponding in DCE6?NOTE: If this is the very basic VBI Vertical Blank Interrupt signal handling, there should be dce6 registers/masks,
but some hint/documentation is necessary for me to find them.Quoted 1 line
Mauro - gfx6 may require some ad hoc initialization, skipped for the moment
Are there ad hoc tiling settings which are necessary?
The OpenGLES and Vulkan radv apps I've tested:
Android CTS dEQP-VK only 85 tests failed over 220'000 Toy Zombies Lite
Sky Force Reloaded
V1 Benchmark Pro
GFXbench
Antutu 3D
Various OpenGLES demosHere I'm planning to perform also dEQP-EGL, dEQP-GLES2, dEQP-GLES3 soon, but feedbacks from developers are very welcome and appreciated
Quoted 2 lines
Mauro - Hainan specific code requires review, as some documentation and code paths seem to point that famility may not have DCE6, please confirm
Hainan specifics were removed and are unsupported in the new serie as DCE6 physical module not available in Hainan parts. Unless the
virtual_dcemodules supports atomit, but I don't think so.Quoted 1 line
Mauro - video decoding blocks code have not been touched
UVD and VCE firmwares and code changes for SI were necessary before the series and they are unrelated to AMD DC for SI patches.
Quoted 1 line
Mauro - dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
In amd-staging-drm-next
dce_clock_sourceis generic, SI specifics are not necessary anymore.Quoted 3 lines
Sylvain - It _seems_ there is not that much additional work to do in order to make it properly work.
Ok, let's keep the momentum and continue tackle with x11 display problem and after that I'm runnign piglit no regression with x11 and with wayland too.
Quoted 9 lines
Quoted 1 line
Testing on x11,wayland or other ways
Any other testing tools worth a run?
In case there is some AMD/GPUopen testing tool with unit tests, please let me know
Kind regardsMauro
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Harry,
in this thread some of the coding changes with open points, as a checklist/track for review of upcoming (v2) patches. M.
Quoted 37 lines · Harry Wentland
Quoted 26 lines · Mauro Rossi
Hi,
reporting about some progress made during the weekend, thanks to Sylvain feedback & suggestions.
I have rebased and updated the series on top of
https://cgit.freedesktop.org/~agd5f/linux/?h=amd-staging-drm-nextHere is the
amd_dc_sibranch:
https://github.com/maurossi/linux/tree/amd_dc_si (uploading)
NOTE:arch/x86/kernel/tsc.cchanges for 4K display modes are not there, as they are not strictly needed for amd-gfxCopying also Harry, Alex, Christian and Mike in order to get some objective and infallible
clues/feedbacks about blocking points and about "no care" items.Please, also big things I may have missed.
M.Quoted 5 lines · On Mon, Oct 8, 2018 at 11:23 PM <[email protected]> wrote:
Sylvain - I did hack a bit your patch set on amd-staging-drm-next to make it go through the asic init and I managed to get a x11 display with lines kind of garbled, but you can still understand easily what's on the screen.
Quoted 8 lines
I forgot to mention that since I'm gorgeously trying AMD DC also on Mullins I have reverted d9fda24 (""drm/amdgpu: Don't default to DC support for Kaveri and older")
because on Mullins I can boot with HDMI and HDMI-to-VGA converterI was hoping for AMD DC being re-enabled for Kaveri and older, but I'm available to submit new version of specific patch if required.
Quoted 5 lines
I still need to find time to get through your patchset properly. Just a quick note on this. There are Kabini/Kaveri ASICs with VGA connectors in the market, which the DC code doesn't support. If someone writes it we can re-enable it by default.
Either way, you can revert that patch for your tree or use amdgpu.dc=0 as long as you're aware that VGA won't work with amdgpu on such a kernel.
Harry
At the moment I have reverted commit disabling DC for Kaveri, as I'm using Acer ES1-521 which has HDMI output (with an HDMI-to-VGA converter)
If it's not too complex, I could give it a try to have Kaveri working for laptops with VGA output,
but from your judgment how complex is this task and which code paths need to be touched?
If it is achievable by me, why not?
Quoted 11 lines
Quoted 11 lines
Quoted 5 lines
Sylvain - ... The lines may be garbled in your driver code because, if I recall properly, "line buffer" programing in dce8 is not
the same than in dce6 (look for registers with the "LB" abbreviation). Or some slight differences in frame buffer tiling.So the problem could be related to some kind of scan line or tiling buffer issue,
at the moment thedce_resoucesmodel is grabbed "AS IS" from DCE8 registers/masks
I will check visually this evening the x11 line artifacts on HD7750 Cape Verde, do you have any suggestion on top of Sylvain B. analysis?
Quoted 24 lines
Quoted 24 lines
Quoted 6 lines
Sylvain - I checked the kernel log, and like you said, I got errors in
DM_PPLIBdue to an invalid powerlevel and atombios/vbios table parsing regarding connectors. general dpm is in amdgpu(no DC) for SI, it means the DCE related dpm part in current SI amdgpu code path should be "copied" in DC. It is related very probably to the parsing of VBIOS/ATOMBIOS tables.10-09 21:10:14.427 0 0 E :
[drm:dm_pp_get_static_clocks [amdgpu]] *ERROR*DM_PPLIB: invalid powerlevel state: 0!NOTE: the error is the result of Powerplay dependency introduced by using AMD DC for SI
it's not fatal and it does not seem to affect performance in the BenchmarksDOUBT: I think that it would make sense to set "power level 0" i.e. the "lower state" as safe default,
considering that powerplay smu6/hwmgr are not implemented for SI and smu7 CIK functions do not work,
the AS-IS dpm is the only available option. (and it seams to be working, looking at the framerates 250-280 in the V1 Vulkan benchmark)
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4! 10-09 21:10:14.427 0 0 W [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4!NOTE: the warning also appears with Tonga and Vega, it is a Warning and does not seem to cause issues, so I would assume there is a default treatment in place,
is this related to missing encoder for drm crtc or to other kind of encoder?
Are these Warnings a problem or just Warnings with mid-low severity?
Quoted 15 lines
Quoted 15 lines
Quoted 3 lines
Sylvain - Did add SI handling in some raven firmware loader function. In
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c, "load_dmcu_fw" function augmented with SI chipasic_type.I've merged the change in the (v2) branch
https://github.com/maurossi/linux/tree/amd_dc_siQuoted 6 lines
Sylvain - AFAIK, the real thing that you additionally get with DC is freesync. But freesync is actually going to be interesting only if displays are able to get their sync range lower bound to 0, and get significant power saving thanks to this. For the use case of very low display refresh rate I don't even think displayport or hdmi can do that, and be power friendly (you would have to retrain the link probably each time you send a framebuffer to the display).
Quoted 8 lines
Quoted 8 lines
If freesync is about reducing the framerate rate for power saving, provided that I've seen it be mentioned the first time for GCN 2nd generation, I'm not expecting freesync as a mandatory capability for the series.
Quoted 3 lines
Mauro --
dce60_resourceswas having too many building errors due to missing DCE6 macros in order to temporarily overcome the problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
I also think that using and completing the dce_6_0_{d,sh_mask}.h headers when possible is the best way,
also to be able to control and keep changes separated from dce80 path, while for unmatching items between DCE8 and DCE6 the dce60_resources.c code is worth a review to spot
problems.
There are tenths of CRTCx registers named differently between DCE6 and DCE8.
Quoted 16 lines
Quoted 16 lines
Still to many building errors due to quite different registers naming, pointers to GPU register info (either in GPUopen or by means of listing the DCE6 vs DC8 differences),
or keeping the DCE6 is exactly like DCE8 as register changes are apparently not mission critical.Quoted 2 lines
Mauro - dc/irq suffered the same problem dce_8_0_{d,sh_mask}.h headers were used for the PoC
I could not update dc/irq VBI Vertical Blank Interrupt, because i cannot find the corresponding IRQ register in amdgpu/dce6 registers headers/mask
-CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_INT_ENABLE_MASK +?seems trivial but who knows what is the corresponding in DCE6?
Quoted 7 lines
Quoted 7 lines
-CRTC_VERTICAL_INTERRUPT0_CONTROL__CRTC_VERTICAL_INTERRUPT0_CLEAR_MASK +?seems trivial but who knows what is the corresponding in DCE6?
NOTE: If this is the very basic VBI Vertical Blank Interrupt signal handling, there should be dce6 registers/masks,
but some hint/documentation is necessary for me to find them.
The identification of the vblank interrupt register to be used in DCE6 should suffice to use the dce_6_0_{d,sh_mask}.h headers, this should solve the dc/irq buidling errors.
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
Mauro - gfx6 may require some ad hoc initialization, skipped for the moment
Are there ad hoc tiling settings which are necessary?
This part is way beyond my knowledge, as it involves the OpenGL implementation and compliance,
may we skip gfx6 specifics or are there changes necessary?
Quoted 14 lines
Quoted 14 lines
The OpenGLES and Vulkan radv apps I've tested:
Android CTS dEQP-VK only 85 tests failed over 220'000 Toy Zombies Lite
Sky Force Reloaded
V1 Benchmark Pro
GFXbench
Antutu 3D
Various OpenGLES demosHere I'm planning to perform also dEQP-EGL, dEQP-GLES2, dEQP-GLES3 soon, but feedbacks from developers are very welcome and appreciated
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Mauro - Hainan specific code requires review, as some documentation and code paths seem to point that famility may not have DCE6, please confirm
Hainan specifics were removed and are unsupported in the new serie as DCE6 physical module not available in Hainan parts. Unless the
virtual_dcemodules supports atomit, but I don't think so.
Is it correct that even with virtual DCE block we would not get atomic, so Hainan is to be skipped?
I forgot to say this before, Hainan is not supported in (v2) patches and the commit messages for (v2) patches have been updated accordingly.
Quoted 4 lines
Quoted 4 lines
Quoted 1 line
Mauro - video decoding blocks code have not been touched
UVD and VCE firmwares and code changes for SI were necessary before the series and they are unrelated to AMD DC for SI patches.
For Harry, Alex, do you have plans to add support to UVD, VCE firmware for SI? In any case they seem unrelated to DC code paths.
Quoted 15 lines
Quoted 15 lines
Quoted 2 lines
Mauro - dc/dce/dce_clock_source.{c,h} may be missing some SI/DCE6 specifics
In amd-staging-drm-next
dce_clock_sourceis generic, SI specifics are not necessary anymore.Quoted 3 lines
Sylvain - It _seems_ there is not that much additional work to do in order to make it properly work.
Ok, let's keep the momentum and continue tackle with x11 display problem and after that I'm runnign piglit no regression with x11 and with wayland too.
Quoted 1 line
Testing on x11,wayland or other ways
Quoted 7 lines
Quoted 7 lines
Any other testing tools worth a run?
In case there is some AMD/GPUopen testing tool with unit tests, please let me know
Kind regardsMauro
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx