Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
56ec4c1e
Commit
56ec4c1e
authored
Jul 27, 2009
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agp: tidy up handling of scratch pages w.r.t. DMA API
Signed-off-by:
David Woodhouse
<
David.Woodhouse@intel.com
>
parent
17661681
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
drivers/char/agp/backend.c
drivers/char/agp/backend.c
+13
-10
drivers/char/agp/intel-agp.c
drivers/char/agp/intel-agp.c
+2
-6
No files found.
drivers/char/agp/backend.c
View file @
56ec4c1e
...
...
@@ -150,17 +150,20 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge)
}
bridge
->
scratch_page_real
=
phys_to_gart
(
page_to_phys
(
page
));
bridge
->
scratch_page
=
bridge
->
driver
->
mask_memory
(
bridge
,
phys_to_gart
(
page_to_phys
(
page
)),
0
);
if
(
bridge
->
driver
->
agp_map_page
&&
bridge
->
driver
->
agp_map_page
(
phys_to_virt
(
page_to_phys
(
page
)),
if
(
bridge
->
driver
->
agp_map_page
)
{
if
(
bridge
->
driver
->
agp_map_page
(
phys_to_virt
(
page_to_phys
(
page
)),
&
bridge
->
scratch_page_dma
))
{
dev_err
(
&
bridge
->
dev
->
dev
,
"unable to dma-map scratch page
\n
"
);
rc
=
-
ENOMEM
;
goto
err_out_nounmap
;
}
}
else
{
bridge
->
scratch_page_dma
=
phys_to_gart
(
page_to_phys
(
page
));
}
bridge
->
scratch_page
=
bridge
->
driver
->
mask_memory
(
bridge
,
bridge
->
scratch_page_dma
,
0
);
}
size_value
=
bridge
->
driver
->
fetch_size
();
...
...
drivers/char/agp/intel-agp.c
View file @
56ec4c1e
...
...
@@ -1138,13 +1138,9 @@ static int intel_i915_configure(void)
writel
(
agp_bridge
->
gatt_bus_addr
|
I810_PGETBL_ENABLED
,
intel_private
.
registers
+
I810_PGETBL_CTL
);
readl
(
intel_private
.
registers
+
I810_PGETBL_CTL
);
/* PCI Posting. */
#ifndef USE_PCI_DMA_API
agp_bridge
->
scratch_page_dma
=
agp_bridge
->
scratch_page
;
#endif
if
(
agp_bridge
->
driver
->
needs_scratch_page
)
{
for
(
i
=
intel_private
.
gtt_entries
;
i
<
current_size
->
num_entries
;
i
++
)
{
writel
(
agp_bridge
->
scratch_page
_dma
,
intel_private
.
gtt
+
i
);
writel
(
agp_bridge
->
scratch_page
,
intel_private
.
gtt
+
i
);
}
readl
(
intel_private
.
gtt
+
i
-
1
);
/* PCI Posting. */
}
...
...
@@ -1242,7 +1238,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem, off_t pg_start,
}
for
(
i
=
pg_start
;
i
<
(
mem
->
page_count
+
pg_start
);
i
++
)
writel
(
agp_bridge
->
scratch_page
_dma
,
intel_private
.
gtt
+
i
);
writel
(
agp_bridge
->
scratch_page
,
intel_private
.
gtt
+
i
);
readl
(
intel_private
.
gtt
+
i
-
1
);
...
...
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