Re: [PATCH v2 02/10] drm/amd/display: dc/dce: add DCE6 support (v2)
Hi Harry, On Wed, Oct 17, 2018 at 9:47 PM Wentland, Harry wrote: > > On 2018-10-17 4:35 a.m., Mauro Rossi wrote: > > DCE6 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 > > > > (v2) updated dce60_{hw_sequencer,resources}.c as per amd-staging-drm-next > > removed dce_version cases in dc/dce/dce_clock_source.c > > --- > > drivers/gpu/drm/amd/display/dc/Makefile |4 + > > drivers/gpu/drm/amd/display/dc/dce60/Makefile | 34 + > > .../amd/display/dc/dce60/dce60_hw_sequencer.c | 82 + > > .../amd/display/dc/dce60/dce60_hw_sequencer.h | 36 + > > .../drm/amd/display/dc/dce60/dce60_resource.c | 1458 + > > .../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 + > > 9 files changed, 1946 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 > > > > diff --git a/drivers/gpu/drm/amd/display/dc/Makefile > > b/drivers/gpu/drm/amd/display/dc/Makefile > > index aed538a4d1ba..d5d5acd57559 100644 > > --- a/drivers/gpu/drm/amd/display/dc/Makefile > > +++ b/drivers/gpu/drm/amd/display/dc/Makefile > > @@ -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) > > diff --git a/drivers/gpu/drm/amd/display/dc/dce60/Makefile > > b/drivers/gpu/drm/amd/display/dc/dce60/Makefile > > new file mode 100644 > > index ..39afd7c59a7c > > --- /dev/null > > +++ b/drivers/gpu/drm/amd/display/dc/dce60/Makefile > > @@ -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) > > + > > + > > + > > diff --git a/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c > > b/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c > > new file mode 100644 > > index ..502172bf6097 > > --- /dev/null > > +++ b/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c > > @@ -0,0 +1,82 @@ > > +/* > > + * Copyright 2015 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
Re: [PATCH v2 02/10] drm/amd/display: dc/dce: add DCE6 support (v2)
On 2018-10-17 4:35 a.m., Mauro Rossi wrote: > DCE6 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 > > (v2) updated dce60_{hw_sequencer,resources}.c as per amd-staging-drm-next > removed dce_version cases in dc/dce/dce_clock_source.c > --- > drivers/gpu/drm/amd/display/dc/Makefile |4 + > drivers/gpu/drm/amd/display/dc/dce60/Makefile | 34 + > .../amd/display/dc/dce60/dce60_hw_sequencer.c | 82 + > .../amd/display/dc/dce60/dce60_hw_sequencer.h | 36 + > .../drm/amd/display/dc/dce60/dce60_resource.c | 1458 + > .../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 + > 9 files changed, 1946 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 > > diff --git a/drivers/gpu/drm/amd/display/dc/Makefile > b/drivers/gpu/drm/amd/display/dc/Makefile > index aed538a4d1ba..d5d5acd57559 100644 > --- a/drivers/gpu/drm/amd/display/dc/Makefile > +++ b/drivers/gpu/drm/amd/display/dc/Makefile > @@ -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) > diff --git a/drivers/gpu/drm/amd/display/dc/dce60/Makefile > b/drivers/gpu/drm/amd/display/dc/dce60/Makefile > new file mode 100644 > index ..39afd7c59a7c > --- /dev/null > +++ b/drivers/gpu/drm/amd/display/dc/dce60/Makefile > @@ -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) > + > + > + > diff --git a/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c > b/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c > new file mode 100644 > index ..502172bf6097 > --- /dev/null > +++ b/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c > @@ -0,0 +1,82 @@ > +/* > + * Copyright 2015 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
[PATCH v2 02/10] drm/amd/display: dc/dce: add DCE6 support (v2)
DCE6 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 (v2) updated dce60_{hw_sequencer,resources}.c as per amd-staging-drm-next removed dce_version cases in dc/dce/dce_clock_source.c --- drivers/gpu/drm/amd/display/dc/Makefile |4 + drivers/gpu/drm/amd/display/dc/dce60/Makefile | 34 + .../amd/display/dc/dce60/dce60_hw_sequencer.c | 82 + .../amd/display/dc/dce60/dce60_hw_sequencer.h | 36 + .../drm/amd/display/dc/dce60/dce60_resource.c | 1458 + .../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 + 9 files changed, 1946 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 diff --git a/drivers/gpu/drm/amd/display/dc/Makefile b/drivers/gpu/drm/amd/display/dc/Makefile index aed538a4d1ba..d5d5acd57559 100644 --- a/drivers/gpu/drm/amd/display/dc/Makefile +++ b/drivers/gpu/drm/amd/display/dc/Makefile @@ -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) diff --git a/drivers/gpu/drm/amd/display/dc/dce60/Makefile b/drivers/gpu/drm/amd/display/dc/dce60/Makefile new file mode 100644 index ..39afd7c59a7c --- /dev/null +++ b/drivers/gpu/drm/amd/display/dc/dce60/Makefile @@ -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) + + + diff --git a/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c new file mode 100644 index ..502172bf6097 --- /dev/null +++ b/drivers/gpu/drm/amd/display/dc/dce60/dce60_hw_sequencer.c @@ -0,0 +1,82 @@ +/* + * Copyright 2015 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 + *