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
edc641b2
Commit
edc641b2
authored
Jun 12, 2019
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/kms/gv100-: attach pixel blend mode property to planes
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
a0a76244
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
drivers/gpu/drm/nouveau/dispnv50/atom.h
drivers/gpu/drm/nouveau/dispnv50/atom.h
+2
-0
drivers/gpu/drm/nouveau/dispnv50/wndw.c
drivers/gpu/drm/nouveau/dispnv50/wndw.c
+22
-0
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
+4
-1
No files found.
drivers/gpu/drm/nouveau/dispnv50/atom.h
View file @
edc641b2
...
...
@@ -224,6 +224,8 @@ struct nv50_wndw_atom {
struct
{
u8
depth
;
u8
k1
;
u8
src_color
:
4
;
u8
dst_color
:
4
;
}
blend
;
union
nv50_wndw_atom_mask
{
...
...
drivers/gpu/drm/nouveau/dispnv50/wndw.c
View file @
edc641b2
...
...
@@ -289,6 +289,21 @@ nv50_wndw_atomic_check_acquire(struct nv50_wndw *wndw, bool modeset,
if
(
wndw
->
func
->
blend_set
)
{
asyw
->
blend
.
depth
=
255
-
asyw
->
state
.
normalized_zpos
;
asyw
->
blend
.
k1
=
asyw
->
state
.
alpha
>>
8
;
switch
(
asyw
->
state
.
pixel_blend_mode
)
{
case
DRM_MODE_BLEND_PREMULTI
:
asyw
->
blend
.
src_color
=
2
;
/* K1 */
asyw
->
blend
.
dst_color
=
7
;
/* NEG_K1_TIMES_SRC */
break
;
case
DRM_MODE_BLEND_COVERAGE
:
asyw
->
blend
.
src_color
=
5
;
/* K1_TIMES_SRC */
asyw
->
blend
.
dst_color
=
7
;
/* NEG_K1_TIMES_SRC */
break
;
case
DRM_MODE_BLEND_PIXEL_NONE
:
default:
asyw
->
blend
.
src_color
=
2
;
/* K1 */
asyw
->
blend
.
dst_color
=
4
;
/* NEG_K1 */
break
;
}
if
(
memcmp
(
&
armw
->
blend
,
&
asyw
->
blend
,
sizeof
(
asyw
->
blend
)))
asyw
->
set
.
blend
=
true
;
}
...
...
@@ -661,6 +676,13 @@ nv50_wndw_new_(const struct nv50_wndw_func *func, struct drm_device *dev,
ret
=
drm_plane_create_alpha_property
(
&
wndw
->
plane
);
if
(
ret
)
return
ret
;
ret
=
drm_plane_create_blend_mode_property
(
&
wndw
->
plane
,
BIT
(
DRM_MODE_BLEND_PIXEL_NONE
)
|
BIT
(
DRM_MODE_BLEND_PREMULTI
)
|
BIT
(
DRM_MODE_BLEND_COVERAGE
));
if
(
ret
)
return
ret
;
}
else
{
ret
=
drm_plane_create_zpos_immutable_property
(
&
wndw
->
plane
,
nv50_wndw_zpos_default
(
&
wndw
->
plane
));
...
...
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
View file @
edc641b2
...
...
@@ -89,7 +89,10 @@ wndwc37e_blend_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
evo_mthd
(
push
,
0x02ec
,
7
);
evo_data
(
push
,
asyw
->
blend
.
depth
<<
4
);
evo_data
(
push
,
asyw
->
blend
.
k1
);
evo_data
(
push
,
0x00007722
);
evo_data
(
push
,
asyw
->
blend
.
dst_color
<<
12
|
asyw
->
blend
.
dst_color
<<
8
|
asyw
->
blend
.
src_color
<<
4
|
asyw
->
blend
.
src_color
);
evo_data
(
push
,
0xffff0000
);
evo_data
(
push
,
0xffff0000
);
evo_data
(
push
,
0xffff0000
);
...
...
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