drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/renesas/shmobile/shmob_drm_kms.c- Extension
.c- Size
- 5133 bytes
- Lines
- 190
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm/drm_atomic_helper.hdrm/drm_crtc.hdrm/drm_crtc_helper.hdrm/drm_fourcc.hdrm/drm_gem_dma_helper.hdrm/drm_gem_framebuffer_helper.hdrm/drm_probe_helper.hshmob_drm_crtc.hshmob_drm_drv.hshmob_drm_kms.hshmob_drm_plane.hshmob_drm_regs.h
Detected Declarations
function shmob_drm_fb_createfunction shmob_drm_modeset_init
Annotated Snippet
if (mode_cmd->pitches[1] != mode_cmd->pitches[0] * chroma_cpp) {
dev_dbg(dev->dev,
"luma and chroma pitches do not match\n");
return ERR_PTR(-EINVAL);
}
}
return drm_gem_fb_create(dev, file_priv, info, mode_cmd);
}
static const struct drm_mode_config_funcs shmob_drm_mode_config_funcs = {
.fb_create = shmob_drm_fb_create,
.atomic_check = drm_atomic_helper_check,
.atomic_commit = drm_atomic_helper_commit,
};
int shmob_drm_modeset_init(struct shmob_drm_device *sdev)
{
struct drm_device *dev = &sdev->ddev;
int ret;
ret = drmm_mode_config_init(dev);
if (ret)
return ret;
ret = shmob_drm_crtc_create(sdev);
if (ret < 0)
return ret;
ret = shmob_drm_encoder_create(sdev);
if (ret < 0)
return ret;
ret = shmob_drm_connector_create(sdev, &sdev->encoder);
if (ret < 0)
return ret;
drm_mode_config_reset(dev);
drm_kms_helper_poll_init(dev);
sdev->ddev.mode_config.min_width = 0;
sdev->ddev.mode_config.min_height = 0;
sdev->ddev.mode_config.max_width = 4095;
sdev->ddev.mode_config.max_height = 4095;
sdev->ddev.mode_config.funcs = &shmob_drm_mode_config_funcs;
return 0;
}
Annotation
- Immediate include surface: `drm/drm_atomic_helper.h`, `drm/drm_crtc.h`, `drm/drm_crtc_helper.h`, `drm/drm_fourcc.h`, `drm/drm_gem_dma_helper.h`, `drm/drm_gem_framebuffer_helper.h`, `drm/drm_probe_helper.h`, `shmob_drm_crtc.h`.
- Detected declarations: `function shmob_drm_fb_create`, `function shmob_drm_modeset_init`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.