drivers/staging/sm750fb/sm750_accel.c
Source file repositories/reference/linux-study-clean/drivers/staging/sm750fb/sm750_accel.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/sm750fb/sm750_accel.c- Extension
.c- Size
- 12170 bytes
- Lines
- 414
- Domain
- Driver Families
- Bucket
- drivers/staging
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/mm.hlinux/slab.hlinux/delay.hlinux/fb.hlinux/ioport.hlinux/init.hlinux/pci.hlinux/vmalloc.hlinux/pagemap.hlinux/console.hlinux/platform_device.hsm750.hsm750_accel.h
Detected Declarations
function write_dprfunction read_dprfunction write_dp_portfunction sm750_hw_de_initfunction sm750_hw_set2dformatfunction sm750_hw_fillrectfunction sm750_hw_copyareafunction de_get_transparencyfunction sm750_hw_imageblit
Annotated Snippet
if (sy < dy) {
/* +----------+
* |S |
* | +----------+
* | | | |
* | | | |
* +---|------+ |
* | D|
* +----------+
*/
direction = BOTTOM_TO_TOP;
} else if (sy > dy) {
/* +----------+
* |D |
* | +----------+
* | | | |
* | | | |
* +---|------+ |
* | S|
* +----------+
*/
direction = TOP_TO_BOTTOM;
} else {
/* sy == dy */
if (sx <= dx) {
/* +------+---+------+
* |S | | D|
* | | | |
* | | | |
* | | | |
* +------+---+------+
*/
direction = RIGHT_TO_LEFT;
} else {
/* sx > dx */
/* +------+---+------+
* |D | | S|
* | | | |
* | | | |
* | | | |
* +------+---+------+
*/
direction = LEFT_TO_RIGHT;
}
}
}
if ((direction == BOTTOM_TO_TOP) || (direction == RIGHT_TO_LEFT)) {
sx += width - 1;
sy += height - 1;
dx += width - 1;
dy += height - 1;
}
/*
* Note:
* DE_FOREGROUND and DE_BACKGROUND are don't care.
* DE_COLOR_COMPARE and DE_COLOR_COMPARE_MAKS
* are set by set deSetTransparency().
*/
/*
* 2D Source Base.
* It is an address offset (128 bit aligned)
* from the beginning of frame buffer.
*/
write_dpr(accel, DE_WINDOW_SOURCE_BASE, source_base); /* dpr40 */
/*
* 2D Destination Base.
* It is an address offset (128 bit aligned)
* from the beginning of frame buffer.
*/
write_dpr(accel, DE_WINDOW_DESTINATION_BASE, dest_base); /* dpr44 */
/*
* Program pitch (distance between the 1st points of two adjacent lines).
* Note that input pitch is BYTE value, but the 2D Pitch register uses
* pixel values. Need Byte to pixel conversion.
*/
write_dpr(accel, DE_PITCH,
((dest_pitch / Bpp << DE_PITCH_DESTINATION_SHIFT) &
DE_PITCH_DESTINATION_MASK) |
(source_pitch / Bpp & DE_PITCH_SOURCE_MASK)); /* dpr10 */
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/errno.h`, `linux/string.h`, `linux/mm.h`, `linux/slab.h`, `linux/delay.h`, `linux/fb.h`.
- Detected declarations: `function write_dpr`, `function read_dpr`, `function write_dp_port`, `function sm750_hw_de_init`, `function sm750_hw_set2dformat`, `function sm750_hw_fillrect`, `function sm750_hw_copyarea`, `function de_get_transparency`, `function sm750_hw_imageblit`.
- Atlas domain: Driver Families / drivers/staging.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.