1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Legacy Support Code</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux DRM Developer's Guide"><link rel="up" href="drmInternals.html" title="Chapter&#160;2.&#160;DRM Internals"><link rel="prev" href="ch02s08.html" title="Open/Close, File Operations and IOCTLs"><link rel="next" href="drmExternals.html" title="Chapter&#160;3.&#160;Userland interfaces"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Legacy Support Code</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch02s08.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;2.&#160;DRM Internals</th><td width="20%" align="right">&#160;<a accesskey="n" href="drmExternals.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1127662292"></a>Legacy Support Code</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="ch02s09.html#idp1127663228">Legacy Suspend/Resume</a></span></dt><dt><span class="sect2"><a href="ch02s09.html#idp1127665524">Legacy DMA Services</a></span></dt></dl></div><p>
2      The section very briefly covers some of the old legacy support code which
3      is only used by old DRM drivers which have done a so-called shadow-attach
4      to the underlying device instead of registering as a real driver. This
5      also includes some of the old generic buffer management and command
6      submission code. Do not use any of this in new and modern drivers.
7    </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="idp1127663228"></a>Legacy Suspend/Resume</h3></div></div></div><p>
8	The DRM core provides some suspend/resume code, but drivers wanting full
9	suspend/resume support should provide save() and restore() functions.
10	These are called at suspend, hibernate, or resume time, and should perform
11	any state save or restore required by your device across suspend or
12	hibernate states.
13      </p><pre class="synopsis">int (*suspend) (struct drm_device *, pm_message_t state);
14  int (*resume) (struct drm_device *);</pre><p>
15	Those are legacy suspend and resume methods which
16	<span class="emphasis"><em>only</em></span> work with the legacy shadow-attach driver
17	registration functions. New driver should use the power management
18	interface provided by their bus type (usually through
19	the struct <span class="structname">device_driver</span> dev_pm_ops) and set
20	these methods to NULL.
21      </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="idp1127665524"></a>Legacy DMA Services</h3></div></div></div><p>
22	This should cover how DMA mapping etc. is supported by the core.
23	These functions are deprecated and should not be used.
24      </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s08.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="drmInternals.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="drmExternals.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Open/Close, File Operations and IOCTLs&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;3.&#160;Userland interfaces</td></tr></table></div></body></html>
25