]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reorganize WM structs/unions in CRTC state
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 12 May 2016 14:05:55 +0000 (07:05 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 13 May 2016 14:32:11 +0000 (07:32 -0700)
commit69d6cfd5ac35c7a45cc84bf50c69e5144de2143c
tree8f6f53b7ce1f148dbaa87c25e11fc0a9564e7ead
parentd0a9e2ff269f10e548670e500bc9acf29c26ff64
drm/i915: Reorganize WM structs/unions in CRTC state

Reorganize the nested structures and unions we have for pipe watermark
data in intel_crtc_state so that platform-specific data can be added in
a more sensible manner (and save a bit of memory at the same time).

The change basically changes the organization from:

        union {
                struct intel_pipe_wm ilk;
                struct intel_pipe_wm skl;
        } optimal;

        struct intel_pipe_wm intermediate /* ILK-only */

to

        union {
                struct {
                        struct intel_pipe_wm intermediate;
                        struct intel_pipe_wm optimal;
                } ilk;

                struct {
                        struct intel_pipe_wm optimal;
                } skl;
        }

There should be no functional change here, but it will allow us to add
more platform-specific fields going forward (and more easily extend to
other platform types like VLV).

While we're at it, let's move the entire watermark substructure out to
its own structure definition to make the code slightly more readable.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-2-git-send-email-matthew.d.roper@intel.com
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c