<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Unfortunately, not. I sent this patch to the reporter to try and it  didn’t work.<br>
<br>
- Roman<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org>
<b>On Behalf Of </b>Deucher, Alexander<br>
<b>Sent:</b> Thursday, November 29, 2018 11:27 AM<br>
<b>To:</b> Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Wu, Hersen <hersenxs.wu@amd.com><br>
<b>Subject:</b> Re: [PATCH 09/16] drm/amd/display: fbc state could not reach while enable fbc<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="divtagdefaultwrapper">
<p><span style="font-size:12.0pt;color:black">Do you think this will fix this bug?<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black"><a href="https://bugs.freedesktop.org/show_bug.cgi?id=108577">https://bugs.freedesktop.org/show_bug.cgi?id=108577</a><o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black">If so, we can re-enable fbc.<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p><span style="font-size:12.0pt;color:black">Alex<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> amd-gfx <<a href="mailto:amd-gfx-bounces@lists.freedesktop.org">amd-gfx-bounces@lists.freedesktop.org</a>> on behalf of
<a href="mailto:sunpeng.li@amd.com">sunpeng.li@amd.com</a> <<a href="mailto:sunpeng.li@amd.com">sunpeng.li@amd.com</a>><br>
<b>Sent:</b> Thursday, November 29, 2018 10:52:16 AM<br>
<b>To:</b> <a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<b>Cc:</b> Wu, Hersen<br>
<b>Subject:</b> [PATCH 09/16] drm/amd/display: fbc state could not reach while enable fbc</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">From: hersen wu <<a href="mailto:hersenxs.wu@amd.com">hersenxs.wu@amd.com</a>><br>
<br>
   [WHY] fbc is within the data path from memory to dce. while<br>
   re-configure mc dmif, fbc should be enabled. otherwise, fbc<br>
   may not be enabled properly.<br>
<br>
   [HOW] before re-configure mc dmif, disable fbc, only after<br>
   dmif re-configuration fully done, enable fbc again.<br>
<br>
Signed-off-by: hersen wu <<a href="mailto:hersenxs.wu@amd.com">hersenxs.wu@amd.com</a>><br>
Reviewed-by: Roman Li <<a href="mailto:Roman.Li@amd.com">Roman.Li@amd.com</a>><br>
Acked-by: Leo Li <<a href="mailto:sunpeng.li@amd.com">sunpeng.li@amd.com</a>><br>
---<br>
 .../drm/amd/display/dc/dce110/dce110_compressor.c  | 91 ++++++++--------------<br>
 .../amd/display/dc/dce110/dce110_hw_sequencer.c    | 57 ++++++++------<br>
 drivers/gpu/drm/amd/display/dc/inc/compressor.h    |  1 +<br>
 3 files changed, 66 insertions(+), 83 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c<br>
index 1f7f250..52d50e2 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c<br>
@@ -64,65 +64,37 @@ static const struct dce110_compressor_reg_offsets reg_offsets[] = {<br>
 <br>
 static const uint32_t dce11_one_lpt_channel_max_resolution = 2560 * 1600;<br>
 <br>
-enum fbc_idle_force {<br>
-       /* Bit 0 - Display registers updated */<br>
-       FBC_IDLE_FORCE_DISPLAY_REGISTER_UPDATE = 0x00000001,<br>
-<br>
-       /* Bit 2 - FBC_GRPH_COMP_EN register updated */<br>
-       FBC_IDLE_FORCE_GRPH_COMP_EN = 0x00000002,<br>
-       /* Bit 3 - FBC_SRC_SEL register updated */<br>
-       FBC_IDLE_FORCE_SRC_SEL_CHANGE = 0x00000004,<br>
-       /* Bit 4 - FBC_MIN_COMPRESSION register updated */<br>
-       FBC_IDLE_FORCE_MIN_COMPRESSION_CHANGE = 0x00000008,<br>
-       /* Bit 5 - FBC_ALPHA_COMP_EN register updated */<br>
-       FBC_IDLE_FORCE_ALPHA_COMP_EN = 0x00000010,<br>
-       /* Bit 6 - FBC_ZERO_ALPHA_CHUNK_SKIP_EN register updated */<br>
-       FBC_IDLE_FORCE_ZERO_ALPHA_CHUNK_SKIP_EN = 0x00000020,<br>
-       /* Bit 7 - FBC_FORCE_COPY_TO_COMP_BUF register updated */<br>
-       FBC_IDLE_FORCE_FORCE_COPY_TO_COMP_BUF = 0x00000040,<br>
-<br>
-       /* Bit 24 - Memory write to region 0 defined by MC registers. */<br>
-       FBC_IDLE_FORCE_MEMORY_WRITE_TO_REGION0 = 0x01000000,<br>
-       /* Bit 25 - Memory write to region 1 defined by MC registers */<br>
-       FBC_IDLE_FORCE_MEMORY_WRITE_TO_REGION1 = 0x02000000,<br>
-       /* Bit 26 - Memory write to region 2 defined by MC registers */<br>
-       FBC_IDLE_FORCE_MEMORY_WRITE_TO_REGION2 = 0x04000000,<br>
-       /* Bit 27 - Memory write to region 3 defined by MC registers. */<br>
-       FBC_IDLE_FORCE_MEMORY_WRITE_TO_REGION3 = 0x08000000,<br>
-<br>
-       /* Bit 28 - Memory write from any client other than MCIF */<br>
-       FBC_IDLE_FORCE_MEMORY_WRITE_OTHER_THAN_MCIF = 0x10000000,<br>
-       /* Bit 29 - CG statics screen signal is inactive */<br>
-       FBC_IDLE_FORCE_CG_STATIC_SCREEN_IS_INACTIVE = 0x20000000,<br>
-};<br>
-<br>
-<br>
 static uint32_t align_to_chunks_number_per_line(uint32_t pixels)<br>
 {<br>
         return 256 * ((pixels + 255) / 256);<br>
 }<br>
 <br>
-static void reset_lb_on_vblank(struct dc_context *ctx)<br>
+static void reset_lb_on_vblank(struct compressor *compressor, uint32_t crtc_inst)<br>
 {<br>
-       uint32_t value, frame_count;<br>
+       uint32_t value;<br>
+       uint32_t frame_count;<br>
+       uint32_t status_pos;<br>
         uint32_t retry = 0;<br>
-       uint32_t status_pos =<br>
-                       dm_read_reg(ctx, mmCRTC_STATUS_POSITION);<br>
+       struct dce110_compressor *cp110 = TO_DCE110_COMPRESSOR(compressor);<br>
+<br>
+       cp110->offsets = reg_offsets[crtc_inst];<br>
+<br>
+       status_pos = dm_read_reg(compressor->ctx, DCP_REG(mmCRTC_STATUS_POSITION));<br>
 <br>
 <br>
         /* Only if CRTC is enabled and counter is moving we wait for one frame. */<br>
-       if (status_pos != dm_read_reg(ctx, mmCRTC_STATUS_POSITION)) {<br>
+       if (status_pos != dm_read_reg(compressor->ctx, DCP_REG(mmCRTC_STATUS_POSITION))) {<br>
                 /* Resetting LB on VBlank */<br>
-               value = dm_read_reg(ctx, mmLB_SYNC_RESET_SEL);<br>
+               value = dm_read_reg(compressor->ctx, DCP_REG(mmLB_SYNC_RESET_SEL));<br>
                 set_reg_field_value(value, 3, LB_SYNC_RESET_SEL, LB_SYNC_RESET_SEL);<br>
                 set_reg_field_value(value, 1, LB_SYNC_RESET_SEL, LB_SYNC_RESET_SEL2);<br>
-               dm_write_reg(ctx, mmLB_SYNC_RESET_SEL, value);<br>
+               dm_write_reg(compressor->ctx, DCP_REG(mmLB_SYNC_RESET_SEL), value);<br>
 <br>
-               frame_count = dm_read_reg(ctx, mmCRTC_STATUS_FRAME_COUNT);<br>
+               frame_count = dm_read_reg(compressor->ctx, DCP_REG(mmCRTC_STATUS_FRAME_COUNT));<br>
 <br>
 <br>
                 for (retry = 10000; retry > 0; retry--) {<br>
-                       if (frame_count != dm_read_reg(ctx, mmCRTC_STATUS_FRAME_COUNT))<br>
+                       if (frame_count != dm_read_reg(compressor->ctx, DCP_REG(mmCRTC_STATUS_FRAME_COUNT)))<br>
                                 break;<br>
                         udelay(10);<br>
                 }<br>
@@ -130,13 +102,11 @@ static void reset_lb_on_vblank(struct dc_context *ctx)<br>
                         dm_error("Frame count did not increase for 100ms.\n");<br>
 <br>
                 /* Resetting LB on VBlank */<br>
-               value = dm_read_reg(ctx, mmLB_SYNC_RESET_SEL);<br>
+               value = dm_read_reg(compressor->ctx, DCP_REG(mmLB_SYNC_RESET_SEL));<br>
                 set_reg_field_value(value, 2, LB_SYNC_RESET_SEL, LB_SYNC_RESET_SEL);<br>
                 set_reg_field_value(value, 0, LB_SYNC_RESET_SEL, LB_SYNC_RESET_SEL2);<br>
-               dm_write_reg(ctx, mmLB_SYNC_RESET_SEL, value);<br>
-<br>
+               dm_write_reg(compressor->ctx, DCP_REG(mmLB_SYNC_RESET_SEL), value);<br>
         }<br>
-<br>
 }<br>
 <br>
 static void wait_for_fbc_state_changed(<br>
@@ -226,10 +196,10 @@ void dce110_compressor_enable_fbc(<br>
                 uint32_t addr;<br>
                 uint32_t value, misc_value;<br>
 <br>
-<br>
                 addr = mmFBC_CNTL;<br>
                 value = dm_read_reg(compressor->ctx, addr);<br>
                 set_reg_field_value(value, 1, FBC_CNTL, FBC_GRPH_COMP_EN);<br>
+               /* params->inst is valid HW CRTC instance start from 0 */<br>
                 set_reg_field_value(<br>
                         value,<br>
                         params->inst,<br>
@@ -238,8 +208,10 @@ void dce110_compressor_enable_fbc(<br>
 <br>
                 /* Keep track of enum controller_id FBC is attached to */<br>
                 compressor->is_enabled = true;<br>
-               compressor->attached_inst = params->inst;<br>
-               cp110->offsets = reg_offsets[params->inst];<br>
+               /* attached_inst is SW CRTC instance start from 1<br>
+                * 0 = CONTROLLER_ID_UNDEFINED means not attached crtc<br>
+                */<br>
+               compressor->attached_inst = params->inst + CONTROLLER_ID_D0;<br>
 <br>
                 /* Toggle it as there is bug in HW */<br>
                 set_reg_field_value(value, 0, FBC_CNTL, FBC_GRPH_COMP_EN);<br>
@@ -268,9 +240,10 @@ void dce110_compressor_enable_fbc(<br>
 void dce110_compressor_disable_fbc(struct compressor *compressor)<br>
 {<br>
         struct dce110_compressor *cp110 = TO_DCE110_COMPRESSOR(compressor);<br>
+       uint32_t crtc_inst = 0;<br>
 <br>
         if (compressor->options.bits.FBC_SUPPORT) {<br>
-               if (dce110_compressor_is_fbc_enabled_in_hw(compressor, NULL)) {<br>
+               if (dce110_compressor_is_fbc_enabled_in_hw(compressor, &crtc_inst)) {<br>
                         uint32_t reg_data;<br>
                         /* Turn off compression */<br>
                         reg_data = dm_read_reg(compressor->ctx, mmFBC_CNTL);<br>
@@ -284,8 +257,10 @@ void dce110_compressor_disable_fbc(struct compressor *compressor)<br>
                         wait_for_fbc_state_changed(cp110, false);<br>
                 }<br>
 <br>
-               /* Sync line buffer  - dce100/110 only*/<br>
-               reset_lb_on_vblank(compressor->ctx);<br>
+               /* Sync line buffer which fbc was attached to dce100/110 only */<br>
+               if (crtc_inst > CONTROLLER_ID_UNDEFINED && crtc_inst < CONTROLLER_ID_D3)<br>
+                       reset_lb_on_vblank(compressor,<br>
+                                       crtc_inst - CONTROLLER_ID_D0);<br>
         }<br>
 }<br>
 <br>
@@ -328,6 +303,8 @@ void dce110_compressor_program_compressed_surface_address_and_pitch(<br>
         uint32_t compressed_surf_address_low_part =<br>
                 compressor->compr_surface_address.addr.low_part;<br>
 <br>
+       cp110->offsets = reg_offsets[params->inst];<br>
+<br>
         /* Clear content first. */<br>
         dm_write_reg(<br>
                 compressor->ctx,<br>
@@ -410,13 +387,7 @@ void dce110_compressor_set_fbc_invalidation_triggers(<br>
         value = dm_read_reg(compressor->ctx, addr);<br>
         set_reg_field_value(<br>
                 value,<br>
-               fbc_trigger |<br>
-               FBC_IDLE_FORCE_GRPH_COMP_EN |<br>
-               FBC_IDLE_FORCE_SRC_SEL_CHANGE |<br>
-               FBC_IDLE_FORCE_MIN_COMPRESSION_CHANGE |<br>
-               FBC_IDLE_FORCE_ALPHA_COMP_EN |<br>
-               FBC_IDLE_FORCE_ZERO_ALPHA_CHUNK_SKIP_EN |<br>
-               FBC_IDLE_FORCE_FORCE_COPY_TO_COMP_BUF,<br>
+               fbc_trigger,<br>
                 FBC_IDLE_FORCE_CLEAR_MASK,<br>
                 FBC_IDLE_FORCE_CLEAR_MASK);<br>
         dm_write_reg(compressor->ctx, addr, value);<br>
@@ -549,7 +520,7 @@ void dce110_compressor_construct(struct dce110_compressor *compressor,<br>
         compressor->base.channel_interleave_size = 0;<br>
         compressor->base.dram_channels_num = 0;<br>
         compressor->base.lpt_channels_num = 0;<br>
-       compressor->base.attached_inst = 0;<br>
+       compressor->base.attached_inst = CONTROLLER_ID_UNDEFINED;<br>
         compressor->base.is_enabled = false;<br>
         compressor->base.funcs = &dce110_compressor_funcs;<br>
 <br>
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c<br>
index 2f062ba..6349ba7 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c<br>
@@ -1766,12 +1766,13 @@ static void set_static_screen_control(struct pipe_ctx **pipe_ctx,<br>
  *  Check if FBC can be enabled<br>
  */<br>
 static bool should_enable_fbc(struct dc *dc,<br>
-                             struct dc_state *context,<br>
-                             uint32_t *pipe_idx)<br>
+               struct dc_state *context,<br>
+               uint32_t *pipe_idx)<br>
 {<br>
         uint32_t i;<br>
         struct pipe_ctx *pipe_ctx = NULL;<br>
         struct resource_context *res_ctx = &context->res_ctx;<br>
+       unsigned int underlay_idx = dc->res_pool->underlay_pipe_index;<br>
 <br>
 <br>
         ASSERT(dc->fbc_compressor);<br>
@@ -1786,14 +1787,28 @@ static bool should_enable_fbc(struct dc *dc,<br>
 <br>
         for (i = 0; i < dc->res_pool->pipe_count; i++) {<br>
                 if (res_ctx->pipe_ctx[i].stream) {<br>
+<br>
                         pipe_ctx = &res_ctx->pipe_ctx[i];<br>
-                       *pipe_idx = i;<br>
-                       break;<br>
+<br>
+                       if (!pipe_ctx)<br>
+                               continue;<br>
+<br>
+                       /* fbc not applicable on underlay pipe */<br>
+                       if (pipe_ctx->pipe_idx != underlay_idx) {<br>
+                               *pipe_idx = i;<br>
+                               break;<br>
+                       }<br>
                 }<br>
         }<br>
 <br>
-       /* Pipe context should be found */<br>
-       ASSERT(pipe_ctx);<br>
+       if (i == dc->res_pool->pipe_count)<br>
+               return false;<br>
+<br>
+       if (!pipe_ctx->stream->sink)<br>
+               return false;<br>
+<br>
+       if (!pipe_ctx->stream->sink->link)<br>
+               return false;<br>
 <br>
         /* Only supports eDP */<br>
         if (pipe_ctx->stream->sink->link->connector_signal != SIGNAL_TYPE_EDP)<br>
@@ -1817,8 +1832,9 @@ static bool should_enable_fbc(struct dc *dc,<br>
 /*<br>
  *  Enable FBC<br>
  */<br>
-static void enable_fbc(struct dc *dc,<br>
-                      struct dc_state *context)<br>
+static void enable_fbc(<br>
+               struct dc *dc,<br>
+               struct dc_state *context)<br>
 {<br>
         uint32_t pipe_idx = 0;<br>
 <br>
@@ -1828,10 +1844,9 @@ static void enable_fbc(struct dc *dc,<br>
                 struct compressor *compr = dc->fbc_compressor;<br>
                 struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[pipe_idx];<br>
 <br>
-<br>
                 params.source_view_width = pipe_ctx->stream->timing.h_addressable;<br>
                 params.source_view_height = pipe_ctx->stream->timing.v_addressable;<br>
-<br>
+               params.inst = pipe_ctx->stream_res.tg->inst;<br>
                 compr->compr_surface_address.quad_part = dc->ctx->fbc_gpu_addr;<br>
 <br>
                 compr->funcs->surface_address_and_pitch(compr, &params);<br>
@@ -2046,10 +2061,10 @@ enum dc_status dce110_apply_ctx_to_hw(<br>
                         return status;<br>
         }<br>
 <br>
-       dcb->funcs->set_scratch_critical_state(dcb, false);<br>
-<br>
         if (dc->fbc_compressor)<br>
-               enable_fbc(dc, context);<br>
+               enable_fbc(dc, dc->current_state);<br>
+<br>
+       dcb->funcs->set_scratch_critical_state(dcb, false);<br>
 <br>
         return DC_OK;<br>
 }<br>
@@ -2408,7 +2423,6 @@ static void dce110_program_front_end_for_pipe(<br>
         struct dc_plane_state *plane_state = pipe_ctx->plane_state;<br>
         struct xfm_grph_csc_adjustment adjust;<br>
         struct out_csc_color_matrix tbl_entry;<br>
-       unsigned int underlay_idx = dc->res_pool->underlay_pipe_index;<br>
         unsigned int i;<br>
         DC_LOGGER_INIT();<br>
         memset(&tbl_entry, 0, sizeof(tbl_entry));<br>
@@ -2449,15 +2463,6 @@ static void dce110_program_front_end_for_pipe(<br>
 <br>
         program_scaler(dc, pipe_ctx);<br>
 <br>
-       /* fbc not applicable on Underlay pipe */<br>
-       if (dc->fbc_compressor && old_pipe->stream &&<br>
-           pipe_ctx->pipe_idx != underlay_idx) {<br>
-               if (plane_state->tiling_info.gfx8.array_mode == DC_ARRAY_LINEAR_GENERAL)<br>
-                       dc->fbc_compressor->funcs->disable_fbc(dc->fbc_compressor);<br>
-               else<br>
-                       enable_fbc(dc, dc->current_state);<br>
-       }<br>
-<br>
         mi->funcs->mem_input_program_surface_config(<br>
                         mi,<br>
                         plane_state->format,<br>
@@ -2534,6 +2539,9 @@ static void dce110_apply_ctx_for_surface(<br>
         if (num_planes == 0)<br>
                 return;<br>
 <br>
+       if (dc->fbc_compressor)<br>
+               dc->fbc_compressor->funcs->disable_fbc(dc->fbc_compressor);<br>
+<br>
         for (i = 0; i < dc->res_pool->pipe_count; i++) {<br>
                 struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];<br>
                 struct pipe_ctx *old_pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i];<br>
@@ -2576,6 +2584,9 @@ static void dce110_apply_ctx_for_surface(<br>
                         (pipe_ctx->plane_state || old_pipe_ctx->plane_state))<br>
                         dc->hwss.pipe_control_lock(dc, pipe_ctx, false);<br>
         }<br>
+<br>
+       if (dc->fbc_compressor)<br>
+               enable_fbc(dc, dc->current_state);<br>
 }<br>
 <br>
 static void dce110_power_down_fe(struct dc *dc, struct pipe_ctx *pipe_ctx)<br>
diff --git a/drivers/gpu/drm/amd/display/dc/inc/compressor.h b/drivers/gpu/drm/amd/display/dc/inc/compressor.h<br>
index bcb18f5..7a147a9 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/inc/compressor.h<br>
+++ b/drivers/gpu/drm/amd/display/dc/inc/compressor.h<br>
@@ -77,6 +77,7 @@ struct compressor_funcs {<br>
 };<br>
 struct compressor {<br>
         struct dc_context *ctx;<br>
+       /* CONTROLLER_ID_D0 + instance, CONTROLLER_ID_UNDEFINED = 0 */<br>
         uint32_t attached_inst;<br>
         bool is_enabled;<br>
         const struct compressor_funcs *funcs;<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>