All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dave Airlie" <airlied@redhat.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 14/19] drm/amd/display: Restrict the dc directory root to DC-internal builds
Date: Thu, 12 Nov 2026 02:08:29 +0000	[thread overview]
Message-ID: <sashiko-outbox-210155@kernel.org> (raw)
In-Reply-To: <20261112-amdgpu-dc-cleanup-v1-14-0fae41718ad2@redhat.com>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] drm/amdgpu: build failure with CONFIG_DRM_AMD_DC=n due to
  missing dc/inc path
- [Medium] drm/amd/display: dc root include flag left in
  amdgpu_dm/Makefile
- [Low] drm/amd/display: stale dc.h path in display-manager.rst
  kernel-doc directives
--

commit a3254d30f8e563b4854ad67277856c56f8a96107
Author: Dave Airlie <airlied@redhat.com>

drm/amd/display: Restrict the dc directory root to DC-internal builds

This commit moves public headers from drivers/gpu/drm/amd/display/dc/ into
drivers/gpu/drm/amd/display/dc/inc/ and restricts the dc root include path
to DC-internal objects.

> diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile
> index 8687afc00c24c..55c89f8d764e2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/Makefile
> +++ b/drivers/gpu/drm/amd/amdgpu/Makefile
> @@ -39,7 +39,6 @@ ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \
>  	-I$(FULL_AMD_DISPLAY_PATH) \
>  	-I$(FULL_AMD_DISPLAY_PATH)/include \
>  	-I$(FULL_AMD_DISPLAY_PATH)/modules/inc \
> -	-I$(FULL_AMD_DISPLAY_PATH)/dc \
>  	-I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm \
>  	-I$(FULL_AMD_PATH)/amdkfd \
>  	-I$(FULL_AMD_PATH)/ras/ras_mgr

[Severity: High]
Does removing -I$(FULL_AMD_DISPLAY_PATH)/dc without replacing it with
-I$(FULL_AMD_DISPLAY_PATH)/dc/inc break the build when CONFIG_DRM_AMD_DC is
disabled?

-I$(FULL_AMD_DISPLAY_PATH)/dc/inc/ is only added in
drivers/gpu/drm/amd/display/Makefile, which is included conditionally on
CONFIG_DRM_AMD_DC.  However, drivers/gpu/drm/amd/amdgpu/amdgpu.h
unconditionally includes dm_pp_interface.h and amdgpu_dm.h, which pull in
dm_services_types.h, os_types.h, dc_types.h, irq_types.h, and dm_services.h
that this patch moves into dc/inc/.

[ ... ]

> diff --git a/drivers/gpu/drm/amd/display/dc/Makefile b/drivers/gpu/drm/amd/display/dc/Makefile
> index 440f5d3581887..c0fc7f7d241d8 100644
> --- a/drivers/gpu/drm/amd/display/dc/Makefile
> +++ b/drivers/gpu/drm/amd/display/dc/Makefile
> @@ -98,3 +98,13 @@ endif
>  
>  AMD_DISPLAY_FILES += $(addprefix $(AMDDALPATH)/dc/, $(FILES))
>  
> +# The dc directory root holds private headers (dc_priv.h and friends) that
> +# must not be reachable outside DC, so the global include path deliberately
> +# stops at dc/inc. DC-internal objects still need the root on their include
> +# path for the many "subdir/header.h" includes inside DC, so add it per
> +# object instead of through a global ccflags-y entry.
> +DC_INTERNAL_OBJS := $(filter $(AMDDALPATH)/dc/%,$(AMD_DISPLAY_FILES))
> +$(foreach obj,$(DC_INTERNAL_OBJS),\
> +	$(eval CFLAGS_$(obj) += -I$(FULL_AMD_DISPLAY_PATH)/dc))
> +
> +

[Severity: Medium]
Does drivers/gpu/drm/amd/display/amdgpu_dm/Makefile still export the dc
root include path globally?

The commit message notes that -I$(FULL_AMD_DISPLAY_PATH)/dc is removed from
amdgpu_dm/Makefile, but that file is not modified by this patch and still
has:

drivers/gpu/drm/amd/display/amdgpu_dm/Makefile:
    subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc

Because drivers/gpu/drm/amd/display/Makefile includes amdgpu_dm/Makefile in
the top-level amdgpu build, Kbuild adds subdir-ccflags-y to KBUILD_CFLAGS
for all objects in amdgpu, amdgpu_dm, DAL modules, and tests, leaving
dc_priv.h and other dc root headers reachable outside DC.

[ ... ]

> diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/inc/dc.h
> similarity index 99%
> rename from drivers/gpu/drm/amd/display/dc/dc.h
> rename to drivers/gpu/drm/amd/display/dc/inc/dc.h

[Severity: Low]
Should Documentation/gpu/amdgpu/display/display-manager.rst also be updated
for the new path of dc.h?  It has two kernel-doc directives that still
reference drivers/gpu/drm/amd/display/dc/dc.h, which will cause htmldocs
builds to fail to locate the file.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-amdgpu-dc-cleanup-v1-0-0fae41718ad2@redhat.com?part=14

  reply	other threads:[~2026-11-12  2:08 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12  1:43 [PATCH 00/19] drm/amd/display: refactor DC interfaces to abstract it better Dave Airlie
2026-11-12  1:43 ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 01/19] drm/amd/display: Drop the dead vmid module Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 02/19] drm/amd/display: Add DC accessors as the first step to opaque struct dc Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 03/19] drm/amd/display: Take struct dc in public DSC compute helpers Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 04/19] drm/amd/display/amdgpu_dm: Use DC accessors in audio/color/backlight paths Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:50   ` sashiko-bot
2026-11-12  1:43 ` [PATCH 05/19] drm/amd/display/amdgpu_dm: Use DC accessors in psr/replay/dmub/hdcp/irq paths Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  2:07   ` sashiko-bot
2026-11-12  1:43 ` [PATCH 06/19] drm/amd/display/amdgpu_dm: Use DC accessors in plane/crtc/helpers paths Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:58   ` sashiko-bot
2026-11-12  1:43 ` [PATCH 07/19] drm/amd/display/amdgpu_dm: Use DC accessors in connector paths Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 08/19] drm/amd/display: Use DC accessors in DAL modules Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 09/19] drm/amd/display/amdgpu_dm: Use DC accessors in debugfs paths Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:53   ` sashiko-bot
2026-11-12  1:43 ` [PATCH 10/19] drm/amd/display/amdgpu_dm: Use DC accessors in the DM core paths Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 11/19] drm/amd/display/amdgpu_dm: Finish DC accessor migration for non-test code Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:53   ` sashiko-bot
2026-11-12  1:43 ` [PATCH 12/19] drm/amd/display: Migrate amdgpu_dm KUnit tests off struct dc internals Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:59   ` sashiko-bot
2026-11-12  1:43 ` [PATCH 13/19] drm/amd/display: Move struct dc out of the public dc.h Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 14/19] drm/amd/display: Restrict the dc directory root to DC-internal builds Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  2:08   ` sashiko-bot [this message]
2026-11-12  1:43 ` [PATCH 15/19] drm/amd/display: Add dc_force_max_dramclk for the DP compliance workaround Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  2:02   ` sashiko-bot
2026-11-12  1:43 ` [PATCH 16/19] drm/amd/display: Add DC primitives for ABM hardware programming Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  2:01   ` sashiko-bot
2026-11-12  1:43 ` [PATCH 17/19] drm/amd/display: Replace the dc_get_res_pool accessor with purpose APIs Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  1:43 ` [PATCH 18/19] drm/amd/display: Replace dc_get_config with per-option config reads Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12 20:31   ` Harry Wentland
2026-11-12  1:43 ` [PATCH 19/19] drm/amd/display: Replace dc_get_caps with purpose-built capability queries Dave Airlie
2026-11-12  1:43   ` Dave Airlie via B4 Relay
2026-11-12  2:14   ` sashiko-bot
2026-11-12 19:41   ` Harry Wentland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-210155@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=airlied@redhat.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.