]> 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)
commitded28d1fe26cac61ddaf908639aefca7c50b3121
tree8f6f53b7ce1f148dbaa87c25e11fc0a9564e7ead
parentb27503a309b00146f07c668cdd7a335e80bea86c
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