drivers/video/fbdev/omap2/omapfb/dss/display.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/omap2/omapfb/dss/display.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/omap2/omapfb/dss/display.c- Extension
.c- Size
- 7712 bytes
- Lines
- 329
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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
linux/export.hlinux/kernel.hlinux/module.hlinux/jiffies.hlinux/platform_device.hlinux/of.hvideo/omapfb_dss.hdss.hdss_features.h
Detected Declarations
function Copyrightfunction omapdss_default_get_recommended_bppfunction omapdss_default_get_timingsfunction dss_suspend_all_devicesfunction for_each_dss_devfunction dss_resume_all_devicesfunction for_each_dss_devfunction dss_disable_all_devicesfunction for_each_dss_devfunction omapdss_register_displayfunction omapdss_unregister_displayfunction omap_dss_put_devicefunction list_for_eachfunction intfunction videomode_to_omap_video_timingsfunction omap_video_timings_to_videomodeexport omapdss_default_get_resolutionexport omapdss_default_get_recommended_bppexport omapdss_default_get_timingsexport omapdss_register_displayexport omapdss_unregister_displayexport omap_dss_get_deviceexport omap_dss_put_deviceexport omap_dss_get_next_deviceexport omap_dss_find_deviceexport videomode_to_omap_video_timingsexport omap_video_timings_to_videomode
Annotated Snippet
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) {
dssdev->driver->disable(dssdev);
dssdev->activate_after_resume = true;
} else {
dssdev->activate_after_resume = false;
}
}
return 0;
}
int dss_resume_all_devices(void)
{
struct omap_dss_device *dssdev = NULL;
for_each_dss_dev(dssdev) {
if (!dssdev->driver)
continue;
if (dssdev->activate_after_resume) {
dssdev->driver->enable(dssdev);
dssdev->activate_after_resume = false;
}
}
return 0;
}
void dss_disable_all_devices(void)
{
struct omap_dss_device *dssdev = NULL;
for_each_dss_dev(dssdev) {
if (!dssdev->driver)
continue;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
dssdev->driver->disable(dssdev);
}
}
static LIST_HEAD(panel_list);
static DEFINE_MUTEX(panel_list_mutex);
static int disp_num_counter;
int omapdss_register_display(struct omap_dss_device *dssdev)
{
struct omap_dss_driver *drv = dssdev->driver;
int id;
/*
* Note: this presumes all the displays are either using DT or non-DT,
* which normally should be the case. This also presumes that all
* displays either have an DT alias, or none has.
*/
if (dssdev->dev->of_node) {
id = of_alias_get_id(dssdev->dev->of_node, "display");
if (id < 0)
id = disp_num_counter++;
} else {
id = disp_num_counter++;
}
snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id);
/* Use 'label' property for name, if it exists */
if (dssdev->dev->of_node)
of_property_read_string(dssdev->dev->of_node, "label",
&dssdev->name);
if (dssdev->name == NULL)
dssdev->name = dssdev->alias;
if (drv && drv->get_resolution == NULL)
drv->get_resolution = omapdss_default_get_resolution;
if (drv && drv->get_recommended_bpp == NULL)
drv->get_recommended_bpp = omapdss_default_get_recommended_bpp;
if (drv && drv->get_timings == NULL)
drv->get_timings = omapdss_default_get_timings;
mutex_lock(&panel_list_mutex);
list_add_tail(&dssdev->panel_list, &panel_list);
mutex_unlock(&panel_list_mutex);
return 0;
}
EXPORT_SYMBOL(omapdss_register_display);
void omapdss_unregister_display(struct omap_dss_device *dssdev)
Annotation
- Immediate include surface: `linux/export.h`, `linux/kernel.h`, `linux/module.h`, `linux/jiffies.h`, `linux/platform_device.h`, `linux/of.h`, `video/omapfb_dss.h`, `dss.h`.
- Detected declarations: `function Copyright`, `function omapdss_default_get_recommended_bpp`, `function omapdss_default_get_timings`, `function dss_suspend_all_devices`, `function for_each_dss_dev`, `function dss_resume_all_devices`, `function for_each_dss_dev`, `function dss_disable_all_devices`, `function for_each_dss_dev`, `function omapdss_register_display`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: integration 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.