Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
9b8d9d0e
Commit
9b8d9d0e
authored
Jan 08, 2007
by
Thomas Hellstrom
Committed by
Dave Airlie
Feb 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
via: allow for npot texture pitch alignment
Signed-off-by:
Dave Airlie
<
airlied@linux.ie
>
parent
689692e7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
11 deletions
+24
-11
drivers/char/drm/via_drv.h
drivers/char/drm/via_drv.h
+2
-2
drivers/char/drm/via_verifier.c
drivers/char/drm/via_verifier.c
+21
-9
drivers/char/drm/via_verifier.h
drivers/char/drm/via_verifier.h
+1
-0
No files found.
drivers/char/drm/via_drv.h
View file @
9b8d9d0e
...
@@ -29,10 +29,10 @@
...
@@ -29,10 +29,10 @@
#define DRIVER_NAME "via"
#define DRIVER_NAME "via"
#define DRIVER_DESC "VIA Unichrome / Pro"
#define DRIVER_DESC "VIA Unichrome / Pro"
#define DRIVER_DATE "2006
0529
"
#define DRIVER_DATE "2006
1227
"
#define DRIVER_MAJOR 2
#define DRIVER_MAJOR 2
#define DRIVER_MINOR 1
0
#define DRIVER_MINOR 1
1
#define DRIVER_PATCHLEVEL 0
#define DRIVER_PATCHLEVEL 0
#include "via_verifier.h"
#include "via_verifier.h"
...
...
drivers/char/drm/via_verifier.c
View file @
9b8d9d0e
...
@@ -306,6 +306,7 @@ static __inline__ int finish_current_sequence(drm_via_state_t * cur_seq)
...
@@ -306,6 +306,7 @@ static __inline__ int finish_current_sequence(drm_via_state_t * cur_seq)
unsigned
long
lo
=
~
0
,
hi
=
0
,
tmp
;
unsigned
long
lo
=
~
0
,
hi
=
0
,
tmp
;
uint32_t
*
addr
,
*
pitch
,
*
height
,
tex
;
uint32_t
*
addr
,
*
pitch
,
*
height
,
tex
;
unsigned
i
;
unsigned
i
;
int
npot
;
if
(
end
>
9
)
if
(
end
>
9
)
end
=
9
;
end
=
9
;
...
@@ -316,11 +317,14 @@ static __inline__ int finish_current_sequence(drm_via_state_t * cur_seq)
...
@@ -316,11 +317,14 @@ static __inline__ int finish_current_sequence(drm_via_state_t * cur_seq)
&
(
cur_seq
->
t_addr
[
tex
=
cur_seq
->
texture
][
start
]);
&
(
cur_seq
->
t_addr
[
tex
=
cur_seq
->
texture
][
start
]);
pitch
=
&
(
cur_seq
->
pitch
[
tex
][
start
]);
pitch
=
&
(
cur_seq
->
pitch
[
tex
][
start
]);
height
=
&
(
cur_seq
->
height
[
tex
][
start
]);
height
=
&
(
cur_seq
->
height
[
tex
][
start
]);
npot
=
cur_seq
->
tex_npot
[
tex
];
for
(
i
=
start
;
i
<=
end
;
++
i
)
{
for
(
i
=
start
;
i
<=
end
;
++
i
)
{
tmp
=
*
addr
++
;
tmp
=
*
addr
++
;
if
(
tmp
<
lo
)
if
(
tmp
<
lo
)
lo
=
tmp
;
lo
=
tmp
;
if
(
i
==
0
&&
npot
)
tmp
+=
(
*
height
++
*
*
pitch
++
);
else
tmp
+=
(
*
height
++
<<
*
pitch
++
);
tmp
+=
(
*
height
++
<<
*
pitch
++
);
if
(
tmp
>
hi
)
if
(
tmp
>
hi
)
hi
=
tmp
;
hi
=
tmp
;
...
@@ -443,14 +447,22 @@ investigate_hazard(uint32_t cmd, hazard_t hz, drm_via_state_t * cur_seq)
...
@@ -443,14 +447,22 @@ investigate_hazard(uint32_t cmd, hazard_t hz, drm_via_state_t * cur_seq)
return
0
;
return
0
;
case
check_texture_addr3
:
case
check_texture_addr3
:
cur_seq
->
unfinished
=
tex_address
;
cur_seq
->
unfinished
=
tex_address
;
tmp
=
((
cmd
>>
24
)
-
0x2B
);
tmp
=
((
cmd
>>
24
)
-
HC_SubA_HTXnL0Pit
);
if
(
tmp
==
0
&&
(
cmd
&
HC_HTXnEnPit_MASK
))
{
cur_seq
->
pitch
[
cur_seq
->
texture
][
tmp
]
=
(
cmd
&
HC_HTXnLnPit_MASK
);
cur_seq
->
tex_npot
[
cur_seq
->
texture
]
=
1
;
}
else
{
cur_seq
->
pitch
[
cur_seq
->
texture
][
tmp
]
=
cur_seq
->
pitch
[
cur_seq
->
texture
][
tmp
]
=
(
cmd
&
0x00F00000
)
>>
20
;
(
cmd
&
HC_HTXnLnPitE_MASK
)
>>
HC_HTXnLnPitE_SHIFT
;
if
(
!
tmp
&&
(
cmd
&
0x000FFFFF
))
{
cur_seq
->
tex_npot
[
cur_seq
->
texture
]
=
0
;
if
(
cmd
&
0x000FFFFF
)
{
DRM_ERROR
DRM_ERROR
(
"Unimplemented texture level 0 pitch mode.
\n
"
);
(
"Unimplemented texture level 0 pitch mode.
\n
"
);
return
2
;
return
2
;
}
}
}
return
0
;
return
0
;
case
check_texture_addr4
:
case
check_texture_addr4
:
cur_seq
->
unfinished
=
tex_address
;
cur_seq
->
unfinished
=
tex_address
;
...
...
drivers/char/drm/via_verifier.h
View file @
9b8d9d0e
...
@@ -43,6 +43,7 @@ typedef struct {
...
@@ -43,6 +43,7 @@ typedef struct {
uint32_t
tex_level_lo
[
2
];
uint32_t
tex_level_lo
[
2
];
uint32_t
tex_level_hi
[
2
];
uint32_t
tex_level_hi
[
2
];
uint32_t
tex_palette_size
[
2
];
uint32_t
tex_palette_size
[
2
];
uint32_t
tex_npot
[
2
];
drm_via_sequence_t
unfinished
;
drm_via_sequence_t
unfinished
;
int
agp_texture
;
int
agp_texture
;
int
multitex
;
int
multitex
;
...
...
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