Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
dffa4878
Commit
dffa4878
authored
Jun 11, 2019
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/kms/gv100-: implement csc + enable modern colour managment properties
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
2c7442ea
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
7 deletions
+99
-7
drivers/gpu/drm/nouveau/dispnv50/base907c.c
drivers/gpu/drm/nouveau/dispnv50/base907c.c
+1
-1
drivers/gpu/drm/nouveau/dispnv50/head.c
drivers/gpu/drm/nouveau/dispnv50/head.c
+1
-2
drivers/gpu/drm/nouveau/dispnv50/wndw.h
drivers/gpu/drm/nouveau/dispnv50/wndw.h
+3
-1
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
+24
-2
drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c
drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c
+70
-1
No files found.
drivers/gpu/drm/nouveau/dispnv50/base907c.c
View file @
dffa4878
...
@@ -101,7 +101,7 @@ csc_drm_to_base(u64 in)
...
@@ -101,7 +101,7 @@ csc_drm_to_base(u64 in)
}
}
}
}
static
void
void
base907c_csc
(
struct
nv50_wndw
*
wndw
,
struct
nv50_wndw_atom
*
asyw
,
base907c_csc
(
struct
nv50_wndw
*
wndw
,
struct
nv50_wndw_atom
*
asyw
,
const
struct
drm_color_ctm
*
ctm
)
const
struct
drm_color_ctm
*
ctm
)
{
{
...
...
drivers/gpu/drm/nouveau/dispnv50/head.c
View file @
dffa4878
...
@@ -512,8 +512,7 @@ nv50_head_create(struct drm_device *dev, int index)
...
@@ -512,8 +512,7 @@ nv50_head_create(struct drm_device *dev, int index)
&
nv50_head_func
,
"head-%d"
,
head
->
base
.
index
);
&
nv50_head_func
,
"head-%d"
,
head
->
base
.
index
);
drm_crtc_helper_add
(
crtc
,
&
nv50_head_help
);
drm_crtc_helper_add
(
crtc
,
&
nv50_head_help
);
drm_mode_crtc_set_gamma_size
(
crtc
,
256
);
drm_mode_crtc_set_gamma_size
(
crtc
,
256
);
if
(
disp
->
disp
->
object
.
oclass
>=
GF110_DISP
&&
if
(
disp
->
disp
->
object
.
oclass
>=
GF110_DISP
)
disp
->
disp
->
object
.
oclass
<
GV100_DISP
)
drm_crtc_enable_color_mgmt
(
crtc
,
256
,
true
,
256
);
drm_crtc_enable_color_mgmt
(
crtc
,
256
,
true
,
256
);
else
else
drm_crtc_enable_color_mgmt
(
crtc
,
0
,
false
,
256
);
drm_crtc_enable_color_mgmt
(
crtc
,
0
,
false
,
256
);
...
...
drivers/gpu/drm/nouveau/dispnv50/wndw.h
View file @
dffa4878
...
@@ -85,6 +85,9 @@ extern const struct drm_plane_funcs nv50_wndw;
...
@@ -85,6 +85,9 @@ extern const struct drm_plane_funcs nv50_wndw;
void
base507c_ntfy_reset
(
struct
nouveau_bo
*
,
u32
);
void
base507c_ntfy_reset
(
struct
nouveau_bo
*
,
u32
);
int
base507c_ntfy_wait_begun
(
struct
nouveau_bo
*
,
u32
,
struct
nvif_device
*
);
int
base507c_ntfy_wait_begun
(
struct
nouveau_bo
*
,
u32
,
struct
nvif_device
*
);
void
base907c_csc
(
struct
nv50_wndw
*
,
struct
nv50_wndw_atom
*
,
const
struct
drm_color_ctm
*
);
struct
nv50_wimm_func
{
struct
nv50_wimm_func
{
void
(
*
point
)(
struct
nv50_wndw
*
,
struct
nv50_wndw_atom
*
);
void
(
*
point
)(
struct
nv50_wndw
*
,
struct
nv50_wndw_atom
*
);
...
@@ -106,7 +109,6 @@ void wndwc37e_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *);
...
@@ -106,7 +109,6 @@ void wndwc37e_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void
wndwc37e_sema_clr
(
struct
nv50_wndw
*
);
void
wndwc37e_sema_clr
(
struct
nv50_wndw
*
);
void
wndwc37e_ntfy_set
(
struct
nv50_wndw
*
,
struct
nv50_wndw_atom
*
);
void
wndwc37e_ntfy_set
(
struct
nv50_wndw
*
,
struct
nv50_wndw_atom
*
);
void
wndwc37e_ntfy_clr
(
struct
nv50_wndw
*
);
void
wndwc37e_ntfy_clr
(
struct
nv50_wndw
*
);
void
wndwc37e_image_set
(
struct
nv50_wndw
*
,
struct
nv50_wndw_atom
*
);
void
wndwc37e_image_clr
(
struct
nv50_wndw
*
);
void
wndwc37e_image_clr
(
struct
nv50_wndw
*
);
void
wndwc37e_update
(
struct
nv50_wndw
*
,
u32
*
);
void
wndwc37e_update
(
struct
nv50_wndw
*
,
u32
*
);
...
...
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
View file @
dffa4878
...
@@ -28,6 +28,23 @@
...
@@ -28,6 +28,23 @@
#include <nvif/clc37e.h>
#include <nvif/clc37e.h>
static
void
wndwc37e_csc_clr
(
struct
nv50_wndw
*
wndw
)
{
}
static
void
wndwc37e_csc_set
(
struct
nv50_wndw
*
wndw
,
struct
nv50_wndw_atom
*
asyw
)
{
u32
*
push
,
i
;
if
((
push
=
evo_wait
(
&
wndw
->
wndw
,
13
)))
{
evo_mthd
(
push
,
0x02bc
,
12
);
for
(
i
=
0
;
i
<
12
;
i
++
)
evo_data
(
push
,
asyw
->
csc
.
matrix
[
i
]);
evo_kick
(
push
,
&
wndw
->
wndw
);
}
}
static
void
static
void
wndwc37e_ilut_clr
(
struct
nv50_wndw
*
wndw
)
wndwc37e_ilut_clr
(
struct
nv50_wndw
*
wndw
)
{
{
...
@@ -77,7 +94,7 @@ wndwc37e_image_clr(struct nv50_wndw *wndw)
...
@@ -77,7 +94,7 @@ wndwc37e_image_clr(struct nv50_wndw *wndw)
}
}
}
}
void
static
void
wndwc37e_image_set
(
struct
nv50_wndw
*
wndw
,
struct
nv50_wndw_atom
*
asyw
)
wndwc37e_image_set
(
struct
nv50_wndw
*
wndw
,
struct
nv50_wndw_atom
*
asyw
)
{
{
u32
*
push
;
u32
*
push
;
...
@@ -90,7 +107,9 @@ wndwc37e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
...
@@ -90,7 +107,9 @@ wndwc37e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
evo_mthd
(
push
,
0x0224
,
4
);
evo_mthd
(
push
,
0x0224
,
4
);
evo_data
(
push
,
asyw
->
image
.
h
<<
16
|
asyw
->
image
.
w
);
evo_data
(
push
,
asyw
->
image
.
h
<<
16
|
asyw
->
image
.
w
);
evo_data
(
push
,
asyw
->
image
.
layout
<<
4
|
asyw
->
image
.
blockh
);
evo_data
(
push
,
asyw
->
image
.
layout
<<
4
|
asyw
->
image
.
blockh
);
evo_data
(
push
,
asyw
->
image
.
colorspace
<<
8
|
asyw
->
image
.
format
);
evo_data
(
push
,
asyw
->
csc
.
valid
<<
17
|
asyw
->
image
.
colorspace
<<
8
|
asyw
->
image
.
format
);
evo_data
(
push
,
asyw
->
image
.
blocks
[
0
]
|
(
asyw
->
image
.
pitch
[
0
]
>>
6
));
evo_data
(
push
,
asyw
->
image
.
blocks
[
0
]
|
(
asyw
->
image
.
pitch
[
0
]
>>
6
));
evo_mthd
(
push
,
0x0240
,
1
);
evo_mthd
(
push
,
0x0240
,
1
);
evo_data
(
push
,
asyw
->
image
.
handle
[
0
]);
evo_data
(
push
,
asyw
->
image
.
handle
[
0
]);
...
@@ -234,6 +253,9 @@ wndwc37e = {
...
@@ -234,6 +253,9 @@ wndwc37e = {
.
ilut
=
wndwc37e_ilut
,
.
ilut
=
wndwc37e_ilut
,
.
xlut_set
=
wndwc37e_ilut_set
,
.
xlut_set
=
wndwc37e_ilut_set
,
.
xlut_clr
=
wndwc37e_ilut_clr
,
.
xlut_clr
=
wndwc37e_ilut_clr
,
.
csc
=
base907c_csc
,
.
csc_set
=
wndwc37e_csc_set
,
.
csc_clr
=
wndwc37e_csc_clr
,
.
image_set
=
wndwc37e_image_set
,
.
image_set
=
wndwc37e_image_set
,
.
image_clr
=
wndwc37e_image_clr
,
.
image_clr
=
wndwc37e_image_clr
,
.
update
=
wndwc37e_update
,
.
update
=
wndwc37e_update
,
...
...
drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c
View file @
dffa4878
...
@@ -28,6 +28,72 @@
...
@@ -28,6 +28,72 @@
#include <nvif/clc37e.h>
#include <nvif/clc37e.h>
static
void
wndwc57e_image_set
(
struct
nv50_wndw
*
wndw
,
struct
nv50_wndw_atom
*
asyw
)
{
u32
*
push
;
if
(
!
(
push
=
evo_wait
(
&
wndw
->
wndw
,
17
)))
return
;
evo_mthd
(
push
,
0x0308
,
1
);
evo_data
(
push
,
asyw
->
image
.
mode
<<
4
|
asyw
->
image
.
interval
);
evo_mthd
(
push
,
0x0224
,
4
);
evo_data
(
push
,
asyw
->
image
.
h
<<
16
|
asyw
->
image
.
w
);
evo_data
(
push
,
asyw
->
image
.
layout
<<
4
|
asyw
->
image
.
blockh
);
evo_data
(
push
,
asyw
->
image
.
colorspace
<<
8
|
asyw
->
image
.
format
);
evo_data
(
push
,
asyw
->
image
.
blocks
[
0
]
|
(
asyw
->
image
.
pitch
[
0
]
>>
6
));
evo_mthd
(
push
,
0x0240
,
1
);
evo_data
(
push
,
asyw
->
image
.
handle
[
0
]);
evo_mthd
(
push
,
0x0260
,
1
);
evo_data
(
push
,
asyw
->
image
.
offset
[
0
]
>>
8
);
evo_mthd
(
push
,
0x0290
,
1
);
evo_data
(
push
,
(
asyw
->
state
.
src_y
>>
16
)
<<
16
|
(
asyw
->
state
.
src_x
>>
16
));
evo_mthd
(
push
,
0x0298
,
1
);
evo_data
(
push
,
(
asyw
->
state
.
src_h
>>
16
)
<<
16
|
(
asyw
->
state
.
src_w
>>
16
));
evo_mthd
(
push
,
0x02a4
,
1
);
evo_data
(
push
,
asyw
->
state
.
crtc_h
<<
16
|
asyw
->
state
.
crtc_w
);
evo_kick
(
push
,
&
wndw
->
wndw
);
}
static
void
wndwc57e_csc_clr
(
struct
nv50_wndw
*
wndw
)
{
u32
*
push
;
if
((
push
=
evo_wait
(
&
wndw
->
wndw
,
13
)))
{
evo_mthd
(
push
,
0x0400
,
12
);
evo_data
(
push
,
0x00010000
);
evo_data
(
push
,
0x00000000
);
evo_data
(
push
,
0x00000000
);
evo_data
(
push
,
0x00000000
);
evo_data
(
push
,
0x00000000
);
evo_data
(
push
,
0x00010000
);
evo_data
(
push
,
0x00000000
);
evo_data
(
push
,
0x00000000
);
evo_data
(
push
,
0x00000000
);
evo_data
(
push
,
0x00000000
);
evo_data
(
push
,
0x00010000
);
evo_data
(
push
,
0x00000000
);
evo_kick
(
push
,
&
wndw
->
wndw
);
}
}
static
void
wndwc57e_csc_set
(
struct
nv50_wndw
*
wndw
,
struct
nv50_wndw_atom
*
asyw
)
{
u32
*
push
,
i
;
if
((
push
=
evo_wait
(
&
wndw
->
wndw
,
13
)))
{
evo_mthd
(
push
,
0x0400
,
12
);
for
(
i
=
0
;
i
<
12
;
i
++
)
evo_data
(
push
,
asyw
->
csc
.
matrix
[
i
]);
evo_kick
(
push
,
&
wndw
->
wndw
);
}
}
static
void
static
void
wndwc57e_ilut_clr
(
struct
nv50_wndw
*
wndw
)
wndwc57e_ilut_clr
(
struct
nv50_wndw
*
wndw
)
{
{
...
@@ -119,7 +185,10 @@ wndwc57e = {
...
@@ -119,7 +185,10 @@ wndwc57e = {
.
ilut_identity
=
true
,
.
ilut_identity
=
true
,
.
xlut_set
=
wndwc57e_ilut_set
,
.
xlut_set
=
wndwc57e_ilut_set
,
.
xlut_clr
=
wndwc57e_ilut_clr
,
.
xlut_clr
=
wndwc57e_ilut_clr
,
.
image_set
=
wndwc37e_image_set
,
.
csc
=
base907c_csc
,
.
csc_set
=
wndwc57e_csc_set
,
.
csc_clr
=
wndwc57e_csc_clr
,
.
image_set
=
wndwc57e_image_set
,
.
image_clr
=
wndwc37e_image_clr
,
.
image_clr
=
wndwc37e_image_clr
,
.
update
=
wndwc37e_update
,
.
update
=
wndwc37e_update
,
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment