linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: amd-gfx@lists.freedesktop.org
Cc: "Daniel Vetter" <daniel@ffwll.ch>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>, "David Airlie" <airlied@linux.ie>,
	"Christian König" <christian.koenig@amd.com>,
	"David Francis" <david.francis@amd.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	"David (ChunMing) Zhou" <david1.zhou@amd.com>,
	"Jerry (Fangzhi) Zuo" <jerry.zuo@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Thomas Lim" <thomas.lim@amd.com>,
	"Lyude Paul" <lyude@redhat.com>,
	"Mario Kleiner" <mario.kleiner.de@gmail.com>,
	"Nicholas Kazlauskas" <nicholas.kazlauskas@amd.com>,
	"Dingchen Zhang" <dingchen.zhang@amd.com>,
	"Brajeswar Ghosh" <brajeswar.linux@gmail.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Sean Paul" <sean@poorly.run>,
	"Maxime Ripard" <mripard@kernel.org>
Subject: [PATCH 0/6] drm/amdgpu: Fix incorrect encoder API usages
Date: Thu, 26 Sep 2019 18:51:02 -0400	[thread overview]
Message-ID: <20190926225122.31455-1-lyude@redhat.com> (raw)

Noticed this while trying to respin my MST suspend/resume patch series.
It's not technically possible (at least until someone moves amdgpu
away from the deprecated drm_device->driver->{load,unload} hooks) for
amdgpu to properly register all of it's encoders before registering with
userspace. However, amdgpu also apparently adds and removes encoders
along with MST connectors - which is a much bigger issue as userspace
applications definitely do not expect this type of behavior.

So, let's fix it and add some WARNs() so new drivers don't accidentally
make this mistake in the future.

Lyude Paul (6):
  drm/amdgpu/dm/mst: Don't create MST topology managers for eDP ports
  drm/amdgpu/dm/mst: Remove unnecessary NULL check
  drm/amdgpu/dm/mst: Use ->atomic_best_encoder
  drm/amdgpu/dm/mst: Make MST encoders per-CRTC and fix encoder usage
  drm/amdgpu/dm/mst: Report possible_crtcs incorrectly, for now
  drm/encoder: WARN() when adding/removing encoders after device
    registration

 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h      |  3 ++
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 ++++++
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  1 -
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 46 ++++++++++---------
 .../display/amdgpu_dm/amdgpu_dm_mst_types.h   |  3 ++
 drivers/gpu/drm/drm_encoder.c                 | 31 ++++++++++---
 6 files changed, 70 insertions(+), 29 deletions(-)

-- 
2.21.0


             reply	other threads:[~2019-09-26 22:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 22:51 Lyude Paul [this message]
2019-09-26 22:51 ` [PATCH 1/6] drm/amdgpu/dm/mst: Don't create MST topology managers for eDP ports Lyude Paul
2019-09-27 17:48   ` Harry Wentland
2019-09-27 18:18     ` Alex Deucher
2019-09-26 22:51 ` [PATCH 2/6] drm/amdgpu/dm/mst: Remove unnecessary NULL check Lyude Paul
2019-09-27 14:05   ` Alex Deucher
2019-09-26 22:51 ` [PATCH 3/6] drm/amdgpu/dm/mst: Use ->atomic_best_encoder Lyude Paul
2019-09-27 14:06   ` Alex Deucher
2019-09-27 17:56   ` Harry Wentland
2019-09-27 18:20     ` Alex Deucher
2019-09-26 22:51 ` [PATCH 4/6] drm/amdgpu/dm/mst: Make MST encoders per-CRTC and fix encoder usage Lyude Paul
2019-09-26 22:51 ` [PATCH 5/6] drm/amdgpu/dm/mst: Report possible_crtcs incorrectly, for now Lyude Paul
2019-09-27 15:27   ` Sean Paul
2019-10-09 15:01     ` Daniel Vetter
2019-10-11 20:51       ` Lyude Paul
2019-10-14  8:45         ` Daniel Vetter
2019-09-26 22:51 ` [PATCH 6/6] drm/encoder: WARN() when adding/removing encoders after device registration Lyude Paul

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=20190926225122.31455-1-lyude@redhat.com \
    --to=lyude@redhat.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=brajeswar.linux@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=david.francis@amd.com \
    --cc=david1.zhou@amd.com \
    --cc=dingchen.zhang@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=jerry.zuo@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mario.kleiner.de@gmail.com \
    --cc=mripard@kernel.org \
    --cc=nicholas.kazlauskas@amd.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=sunpeng.li@amd.com \
    --cc=thomas.lim@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).