]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau/kms/nv50-: Share DP SST mode_valid() handling with MST
authorLyude Paul <lyude@redhat.com>
Mon, 11 May 2020 22:41:27 +0000 (18:41 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 May 2020 01:13:52 +0000 (11:13 +1000)
commitfc262644b783eed9e8456557a5407603f0f92b98
tree4ac9707f29795fe417756132a9d58fcc5c567c60
parent12de637b8fd94926918f26a2143b73eed62e8e25
drm/nouveau/kms/nv50-: Share DP SST mode_valid() handling with MST

Currently, the nv50_mstc_mode_valid() function is happy to take any and
all modes, even the ones we can't actually support sometimes like
interlaced modes.

Luckily, the only difference between the mode validation that needs to
be performed for MST vs. SST is that eventually we'll need to check the
minimum PBN against the MSTB's full PBN capabilities (remember-we don't
care about the current bw state here). Otherwise, all of the other code
can be shared.

So, we move all of the common mode validation in
nouveau_connector_mode_valid() into a separate helper,
nv50_dp_mode_valid(), and use that from both nv50_mstc_mode_valid() and
nouveau_connector_mode_valid(). Note that we allow for returning the
calculated clock that nv50_dp_mode_valid() came up with, since we'll
eventually want to use that for PBN calculation in
nv50_mstc_mode_valid().

Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/disp.c
drivers/gpu/drm/nouveau/nouveau_connector.c
drivers/gpu/drm/nouveau/nouveau_connector.h
drivers/gpu/drm/nouveau/nouveau_dp.c
drivers/gpu/drm/nouveau/nouveau_encoder.h