Skip to content

Commit 9f9f54e

Browse files
author
Ben Skeggs
committed
drm/nouveau/disp/gp100: split SOR implementation from gm200
GP100 needs different HDA detection. Signed-off-by: Ben Skeggs <[email protected]>
1 parent e6867ff commit 9f9f54e

File tree

5 files changed

+63
-2
lines changed

5 files changed

+63
-2
lines changed

drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ nvkm-y += nvkm/engine/disp/sorgf119.o
3939
nvkm-y += nvkm/engine/disp/sorgk104.o
4040
nvkm-y += nvkm/engine/disp/sorgm107.o
4141
nvkm-y += nvkm/engine/disp/sorgm200.o
42+
nvkm-y += nvkm/engine/disp/sorgp100.o
4243
nvkm-y += nvkm/engine/disp/sorgv100.o
4344
nvkm-y += nvkm/engine/disp/sortu102.o
4445

drivers/gpu/drm/nouveau/nvkm/engine/disp/gp100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ gp100_disp = {
3636
.super = gf119_disp_super,
3737
.root = &gp100_disp_root_oclass,
3838
.head = { .cnt = gf119_head_cnt, .new = gf119_head_new },
39-
.sor = { .cnt = gf119_sor_cnt, .new = gm200_sor_new },
39+
.sor = { .cnt = gf119_sor_cnt, .new = gp100_sor_new },
4040
};
4141

4242
int

drivers/gpu/drm/nouveau/nvkm/engine/disp/gp102.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ gp102_disp = {
6363
.super = gf119_disp_super,
6464
.root = &gp102_disp_root_oclass,
6565
.head = { .cnt = gf119_head_cnt, .new = gf119_head_new },
66-
.sor = { .cnt = gf119_sor_cnt, .new = gm200_sor_new },
66+
.sor = { .cnt = gf119_sor_cnt, .new = gp100_sor_new },
6767
};
6868

6969
int

drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ int gf119_sor_new(struct nvkm_disp *, int);
201201
int gk104_sor_new(struct nvkm_disp *, int);
202202
int gm107_sor_new(struct nvkm_disp *, int);
203203
int gm200_sor_new(struct nvkm_disp *, int);
204+
int gp100_sor_new(struct nvkm_disp *, int);
204205

205206
int gv100_sor_cnt(struct nvkm_disp *, unsigned long *);
206207
int gv100_sor_new(struct nvkm_disp *, int);
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright 2020 Red Hat Inc.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a
5+
* copy of this software and associated documentation files (the "Software"),
6+
* to deal in the Software without restriction, including without limitation
7+
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
* and/or sell copies of the Software, and to permit persons to whom the
9+
* Software is furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in
12+
* all copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18+
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19+
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20+
* OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
#include "ior.h"
23+
24+
static const struct nvkm_ior_func
25+
gp100_sor = {
26+
.route = {
27+
.get = gm200_sor_route_get,
28+
.set = gm200_sor_route_set,
29+
},
30+
.state = gf119_sor_state,
31+
.power = nv50_sor_power,
32+
.clock = gf119_sor_clock,
33+
.hdmi = {
34+
.ctrl = gk104_hdmi_ctrl,
35+
.scdc = gm200_hdmi_scdc,
36+
},
37+
.dp = {
38+
.lanes = { 0, 1, 2, 3 },
39+
.links = gf119_sor_dp_links,
40+
.power = g94_sor_dp_power,
41+
.pattern = gm107_sor_dp_pattern,
42+
.drive = gm200_sor_dp_drive,
43+
.vcpi = gf119_sor_dp_vcpi,
44+
.audio = gf119_sor_dp_audio,
45+
.audio_sym = gf119_sor_dp_audio_sym,
46+
.watermark = gf119_sor_dp_watermark,
47+
},
48+
.hda = {
49+
.hpd = gf119_hda_hpd,
50+
.eld = gf119_hda_eld,
51+
.device_entry = gf119_hda_device_entry,
52+
},
53+
};
54+
55+
int
56+
gp100_sor_new(struct nvkm_disp *disp, int id)
57+
{
58+
return nvkm_ior_new_(&gp100_sor, disp, SOR, id);
59+
}

0 commit comments

Comments
 (0)